Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main"
<?xml version="1.0" encoding="UTF-8"?>
<ah:hotels xmlns:ah="http://axishotels.de">
<hotel>
<name>Axis Hotel</name>
<manager>Duke Apache</manager>
<address>
<street>Springstreet</street>
<no>52</no>
<zip>3214</zip>
<country>Dreamland</country>
</address>
</hotel>
<hotel>
<name>Axiom Hotel</name>
<manager>Duke Apache</manager>
<address>
<street>Loggerstreet</street>
<no>984</no>
<zip>5729</zip>
<country>Dreamland</country>
</address>
</hotel>
</ah:hotels>
package test;
import java.io.FileNotFoundException;
import javax.xml.stream.XMLStreamException;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
public class AXIOMSample {
public static void main(String[] args) {
try {
// create the parser
StAXOMBuilder builder = new StAXOMBuilder("AXIOMSample.xml");
// get the root element
OMElement documentElement = builder.getDocumentElement();
// dump the out put to console with caching
System.out.println(documentElement.toStringWithConsume());
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (XMLStreamException e) {
e.printStackTrace();
}
}
}