Frequently Asked Questions

Missing something? More questions?

Take a look at at JAK's discussion group: http://groups.google.com/group/javaapiforkml.

Last update on 2014-02-25 by Moritz Fröhner.

JAK? What does this stand for?

JAK is short for: Java API for KML

Last update on 2014-02-25 by Ulrich Schmidt.

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.

Last update on 2014-02-25 by Ulrich Schmidt.

Missing something? Found an error?

Take a look at the Roadmap or post it at GitHub.

Last update on 2014-04-17 by Moritz Fröhner.

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.
Version 2.1.xx of JAXB should be fine.

After downloading JAXB 2.1.xx (or a later version) the jar needed to be executed with this command:java -jar JAXB2_200xxxxx.jar
or on Windows or Mac, a double-click on the jar file will execute it.

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:

  • activation.jar
  • jaxb-api.jar
  • jaxb-impl.jar
  • jsr173_1.0_api
  • (optional: the jaxb-xjc.jar, if you like to use the XJCPluginJavaApiforKml as well)

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>

Last update on 2014-03-10 by Moritz Fröhner.

JAK vs. libkml?

JAK 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.
While each class of libkml is carefully handcrafted, all of the JAK's code is autogenerated. As a result, changes to OGC's KML schema specification can be added to JAK rapidly. They are not competing with each other. Their purpose is to parse, generate, process, and save KML data in a programmatic manner.

Last update on 2014-02-25 by Moritz Fröhner.

The difference between Java API for KML and XJCPluginJavaApiforKml

The Java API for KML is the result of the XJCPluginJavaApiforKml. In other words: TheXJCPluginJavaApiforKml creates the Java API for KML.
Java API for KML is documented at HelloKML (Quickstart)KML in the Java world, and Usage.
XJCPluginJavaApiforKml is documented at JAK's API approach and Implementation.

Last update on 2014-03-10 by Moritz Fröhner.