xml - How to export KML file with JAK library or libkml -java? -



xml - How to export KML file with JAK library or libkml -java? -

i utilize kml object in java. want export object file. seek write jak library,with function kml.marshal() not successful. error:

exception in thread "main" java.lang.noclassdeffounderror: com/sun/xml/bind/marshaller/namespaceprefixmapper @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclass(unknown source) @ java.security.secureclassloader.defineclass(unknown source) @ java.net.urlclassloader.defineclass(unknown source) @ java.net.urlclassloader.access$100(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.misc.launcher$appclassloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ de.micromata.opengis.kml.v_2_2_0.kml.createmarshaller(kml.java:642) @ de.micromata.opengis.kml.v_2_2_0.kml.marshal(kml.java:682) @ de.micromata.opengis.kml.v_2_2_0.kml.marshal(kml.java:759) @ com.nice.nicetrack.kmlgenerator.tokml(kmlgenerator.java:141) @ com.nice.nicetrack.kmlgenerator.main(kmlgenerator.java:240) caused by: java.lang.classnotfoundexception: com.sun.xml.bind.marshaller.namespaceprefixmapper @ java.net.urlclassloader$1.run(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.misc.launcher$appclassloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) ... 17 more

i don't want utilize xml or string format. kml object!! please- help me!! thanks!

jak depends on java architecture xml binding (jaxb) underlying xml serialization. kml xml format must add together jaxb jars classpath.

jaxb-api-2.2.jar jaxb-impl-2.2.jar

these dependencies can found in pom.xml project. https://github.com/micromata/javaapiforkml/blob/master/pom.xml

if utilize maven build can add together jaxb entries straight pom.xml file, should downloaded automatically if add together javaapiforkml entry shown below:

<dependency> <groupid>de.micromata.jak</groupid> <artifactid>javaapiforkml</artifactid> <version>2.2.1</version> </dependency>

or can download jars straight , add together them classpath: http://download.java.net/maven/2/com/sun/xml/bind/jaxb-impl/2.2/jaxb-impl-2.2.jar http://download.java.net/maven/2/javax/xml/bind/jaxb-api/2.2/jaxb-api-2.2.jar

likewise can straight search jars in central maven repository: https://search.maven.org/#browse

java xml kml jak

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -