jMonkeyEngine 3 -- Source Structure

An overview of the source structure of the JME3 project. In order to support both Desktop and Android Java platforms, it was necessary to split the source code into several parts. This wiki page describes the packages and their purpose. Status: Up-to-date for JME3 beta.

Structure of src directory

You can build jME using the included build.xml script: ant clean; ant jar; ant run When building the sources in a project created with another IDE, include every folder under src in the project as its own separate source root.

Core

Source Package Description
src/core The main package. Must always be included, as all other packages depend on it.
src/core-effects Core effects like Water, PSSM etc.
src/core-data Basic material definitions, shaders and fonts that are needed by most jME3 applications.
src/core-plugins Important asset plugins, such as .j3o model loader, .obj loader, font loader, basic image loaders.
src/desktop Must be included if deploying on desktop, applet or web start. Android
src/android Must be included if deploying on the Android platform. Desktop
src/lwjgl LWJGL OpenGL display implementation. Android

Physics

Source Package Description
src/jbullet Game Physics Engine, based on the jBullet framework. Bullet
src/bullet Game Physics Engine, based on the native Bullet framework. jBullet
src/bullet-common Classes common between native and java Bullet implementations.
src/bullet-native Native Bullet implementation C++ classes. jBullet

Note: Only one of the physics libraries can be used at a time as they replace each other.

Plugins and Extra packages

Source Package Description
src/ogre Ogre3D model and scene loader. Supports skeletal and vertex animation, scene loading, and materials.
src/xml Provides an XML im/exporter.
src/jogg OGG/Vorbis loader to play .ogg sound files.
src/niftygui Support for custom Graphical User Interfaces.
src/blender Blender model importer
src/networking SpiderMonkey networking package
src/terrain Terrain generation tools

Tests, Games and Tools

Source Package Description
src/test Small sample Applications that demo individual jME3 features. ←- jme3_test-data.jar
src/test-data Data assets (jme3_test-data.jar) required by jme3_test samples.
src/tools Tools and programs that help you use jme3.

Structure of lib directory

JME3 depends on the following JARs and native libraries in the lib directory. The JAR libraries must be on the classpath.

The jME3-*natives*.jar bundles contain the native libraries, those are necessary .dll, .jnilib, lib*.so files. You do not need to manually include native libraries on the java.library.path! jME3 handles the extraction of natives automatically via the JAR bundles.

  • lib/android:
    • android.jar
  • lib/bullet:
    • android, jME3-bullet-natives-android.jar, jME3-bullet-natives.jar, jarcontent (natives)
  • lib/jbullet:
    • asm-all.jar, jbullet.jar, stack-alloc.jar, vecmath.jar
  • lib/jogg:
    • j-ogg-oggd.jar, j-ogg-vorbisd.jar
  • lib/lwjgl:
    • jME3-lwjgl-natives.jar, jinput.jar, lwjgl.jar
  • lib/niftygui:
    • nifty.jar, nifty-javadoc.jar, xmlpull-xpp3.jar, eventbus.jar
    • nifty-default-controls-javadoc.jar, nifty-default-controls.jar,
    • nifty-examples.jar, nifty-examples-javadoc.jar, nifty-style-black.jar

Structure of jMonkeyEngine3 JARs

After the build is complete (in the dist directory), you see that the jMonkeyEngine library is split up over several JAR files. This allows for better separation of the parts for different operating systems, projects etc.

JAR file Purpose External Dependence
dist/lib/jME3-core.jar Platform-independent core libraries (math, animation, scenegraph, Wavefront OBJ model support, etc) None
dist/lib/jME3-effects.jar Core jME3 effects (Water, SSAO etc) None
dist/lib/jME3-desktop.jar Desktop PC only jME3 libraries None
dist/lib/jME3-plugins.jar Basic import plugins (OgreXML models and j3o XML) None
dist/lib/jME3-blender.jar Blender model import plugin (Desktop only) None
dist/lib/jME3-networking.jar "Spidermonkey" networking library None
dist/lib/jME3-jogg.jar J-OGG audio plugin j-ogg-vorbisd.jar, j-ogg-oggd.jar
dist/lib/jME3-terrain.jar Terrain system None
dist/lib/jME3-jbullet.jar jBullet physics jbullet.jar, vecmath.jar, stack-alloc.jar, asm-all-3.1.jar
dist/lib/jME3-bullet.jar Bullet physics (only jBullet or Bullet can be used) jME3-bullet-natives.jar
dist/lib/jME3-niftygui.jar NiftyGUI support nifty.jar, nifty-default-controls.jar, eventbus.jar, xmlpull-xpp3.jar
dist/lib/jME3-lwjgl.jar LWJGL Desktop Renderer lwjgl.jar, jME3-lwjgl-natives.jar, jinput.jar
dist/lib/jME3-android.jar Android Renderer Android system

Optional:

  • nifty-examples.jar
  • jME3-testdata.jar
  • nifty-style-black.jar (default nifty style)

API Structure

For details see the http://jmonkeyengine.org/javadoc/.

Data File Types

Path File types purpose
/Common/MatDefs/*/ .glsllib Standard ShaderLibs
/Common/MatDefs/*/ .j3md Standard Material Definitions
/Common/Materials/*/ .j3m Standard Material
/Interface/Fonts/ .fnt + .png Standard Fonts

See also supported File Types.

 
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution 3.0 Unported