|
Java API for KML - FAQ[ JAK? What does this stand for? ] [ JAK! But why? ] [ Missing something? More questions? ] [ Missing something? Found an error? ] [ NoClassDefFoundError? ] [ JAK vs. libkml ] [ The difference between Java API for KML and XJCPluginJavaApiforKml ]
JAK? What does this stand for?JAK is short for: Java API for KML JAK! But why?The main goal of the Java API for KML (JAK) is to provide automatically generated full reference implementation of the KML object model defined by OGC's KML standard and Google's GX extensions. It is an object orientated API that enables the convenient and easy use of KML in existing Java environments. Missing something? More questions?Take a look at at JAK's discussion group: http://groups.google.com/group/javaapiforkml. Missing something? Found an error?Take a look at the Roadmap or post it here: http://code.google.com/p/xjcpluginjavaapiforkml/issues/list. NoClassDefFoundError?JAK only works if all dependencies are resolved! This is mainly JAXB! JAXB needed to be downloaded and the containing JARs put into the classpath. After downloading JAXB 2.1.xx (or a later version) the jar needed to be executed with this command: java -jar JAXB2_200xxxxx.jar In the next step accept the license contract (if you agree) and take a look in the jaxb-ri-200xxxxx/bin folder. From there copy these files to you own lib folder in your JAK project:
These file need to be put into the classpath and all should be fine.
Alternatively JAK can be found in the official dev.java.net Maven 2 repository: Listing 1: JAK at maven2-repository.dev.java.net <dependencies> ... <!-- The Java API for KML --> <dependency> <groupId>de.micromata.jak</groupId> <artifactId>JavaAPIforKml</artifactId> <version>2.2.0-SNAPSHOT</version> </dependency> ... </dependencies> <repositories> ... <repository> <id>maven2-repository.dev.java.net</id> <name>Java.net Maven 2 Repository</name> <url>http://download.java.net/maven/2</url> <layout>default</layout> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> JAK vs. libkmlJAK and libKML are very similar and yet fundamentally different. This is in spite of the fact that JAK is written natively in Java and libkml is offered in C++. Both implement the current OGC KML 2.2 standard as well as Google's Gx extensions. In contrast to libkml or especially C++, no memory management is needed. Java's garbage collector does all of this. The difference between Java API for KML and XJCPluginJavaApiforKmlThe Java API for KML is the result of the XJCPluginJavaApiforKml. In other words: The XJCPluginJavaApiforKml creates the Java API for KML.
Figure 1: The difference between Java API for KML and XJCPluginJavaApiforKml. |
Java API for KML | @Google |










is the OpenSource platform of 