... h3. _JAK_? What does this stand for? _JAK_ is short for: _Java API for KML_ h3. _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. h3. Missing something? More questions? Take a look at at JAK's discussion group: [http://groups.google.com/group/javaapiforkml]. h3. Missing something? Found an error? Take a look at the [Roadmap|jak:Roadmap] or post it here: [http://code.google.com/p/xjcpluginjavaapiforkml/issues/list]. h3. NoClassDefFoundError? JAK only works if all dependencies are resolved! This is mainly [JAXB|https://jaxb.dev.java.net/]! [JAXB|https://jaxb.dev.java.net/] 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|https://jaxb.dev.java.net/] (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) !JAXB_1.png! These file need to be put into the classpath and all should be fine. !JAXB_2.png! Alternatively JAK can be found in the official {{dev.java.net}} Maven 2 repository: {anchor:listing1} {code:xml|title=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> {code} h3. _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. h3. The difference between _Java API for KML_ and _XJCPluginJavaApiforKml_ The [_Java API for KML_|http://code.google.com/p/javaapiforkml/] is the result of the [_XJCPluginJavaApiforKml_|http://code.google.com/p/xjcpluginjavaapiforkml/]. In other words: The _XJCPluginJavaApiforKml_ creates the _Java API for KML_. _Java API for KML_ is documented at [HelloKML (Quickstart)], [jak:KML in the Java world], and [jak:Usage]. _XJCPluginJavaApiforKml_ is documented at [jak:JAK's API approach] and [jak:Implementation]. {anchor:figure1} !faq_difference_between_jak_and_xjc_plugin.png! h6. Figure 1: The difference between _Java API for KML_ and _XJCPluginJavaApiforKml_. {column} {column:width=1%} {column} {column:width=29%} {livesearch:id=1|spaceKey=jak} [Java API for KML|Home] | [@Google|http://code.google.com/p/javaapiforkml/] {pagetree} {column} {section}
|