The jMonkeyPlatform makes it easy to get started with developing 3-D games based on the jMonkeyEngine.
Choose File > New Project from the main menu.
In the New Project Wizard, select the template JME3 > Basic Game
Click next to specify a project name, and the path where to store your new project.
Click Finish. A skeleton application is created and opens in the Project Explorer.

Let's have a look at the abstract project structure in the Project Explorer (ctrl-1).
Project Assets node: These directories have been created for you to store your games assets, such as fonts, materials, models, shaders, sounds, and textures. For a newly created project, these directories are empty.
Source Packages node: This is where you manage your packages and classes. For a newly created project, it contains one package and one class, Main.java
. Double click Main.java
to open it in the editor.
Libraries node: An overview of all libraies on your game's classpath. The classpath is already set-up for the jme3 framework (including LWJGL, JOGG, JOAL, JOGL, etc).
Now let's have a look at the project's file structure in the File Explorer (ctrl-2). This explorer shows the physical directory structure on your hard drive.
assets – This directory corresponds to the Project Assets node. It is needed for the assetManager. This is the recommended internal structure:
assets/Interface
assets/MatDefs
assets/Materials
assets/Models
assets/Scenes
assets/Shaders
assets/Sounds
assets/Textures
src – This directory corresponds to the Source Packages node. Your sources code goes here.
nbproject – This is meta data used by the jMonkeyPlatform (don't edit).
build.xml – This is an Ant build script that is hooked up to the clean/build/run/test actions in the jMonkeyPlatform. It loads a default build script, and allows you to further customize the build process. The Ant script also assures that you are able to clean/build/run/test your application outside of the jMonkeyPlatform – e.g. from the command line.
build – This directory contains the compiled classes. (Will be generated by the jMonkeyPlatform when you build the project.)
dist – This directory contains the executable JAR files. (Will be generated by the jMonkeyPlatform when you build the project.)
test – The jMonkeyPlatform will store JUnit tests here if you create any. (Optional.)
Right-Click the project to open the Project properties.
In the Run section, specify the main class of your project.
In the Run section, you can optionally configure JVM options and command line parameters.
In the Application section, specify the game title (by default the game will be named BasicGame
).
In the Application section, specify the vendor name (your name), a short description, your project's homepage, and a splash screen.
Add the library to the global library list:
Select Tools→Libraries in the main menu.
Click "New Library", enter a name for the library and press OK
In the "Classpath" tab, press "Add JAR/Folder" and select the jar file(s) needed for the library
In the "JavaDoc" tab, press "Add ZIP/Folder" and select the javadoc for the library (zipped or folder)
In the "Sources" tab you can select a folder or jar file containing the source files of the library if available
Press OK
Right-Click your project
Add the library to a project:
Right-Click your project and select "Properties"
Select "Libaries" on the left and then press "Add Library"
Select the library from the list and press OK
Thats it, your project can now use the external library.
Creating new files and packages: Select the Source Packages node (or any of its subnodes), and press ctrl-N (File>New File): Use the New File wizard to create new Java classes, Java packages, Java beans, Swing forms, Junit files, JME3 Materials and Models, and many more.
Editing files: Open the Projects Explorer and double-click a Java file from the Source Packages to open it in the Editor. The
jMonkeyPlatform Editor assists you in many ways, including Syntactic and semantic code coloring, code completion, and javadoc.
(More...) Adding Assets:
ToDo List: The tasks window automatically lists all lines containing errors and warnings, and all lines that you have marked with comment keywords such as FIXME
, @todo, TODO.

Right-Click the project and use the context-menu to clean all generated classes and JARs.
Right-Click individual files with a main method to build and run them. (Shift-F6)
Press the Run button (green arrow in the toolbar) to build and run the project. (F6)
More than one project open? The toolbar buttons and the F-keys are bound to the main project, which is shown in bold in the Project Explorer. Right-click a project and select Set As Main Project to make it respond to the toolbar buttons and F-keys.
Worried About Proprietary Lock-in? You are never locked into the jMonkeyPlatform: At any time, you can change into your project directory on the command line, and clean, build, and run your project, using non-proprietary Apache Ant commands:
ant clean; ant jar; ant run;
You can
deploy your game as desktop application (JAR), browser applet, WebStart (JNLP), or on the Android platform.
(More...)
Choose File > New Project from the main menu.
In the New Project Wizard, select JME3 > JME3 Tests
Click next to pick a path where to store the JME3Tests
project.
Click Finish. The sample project opens.
Right-click the JME3Tests
project and choose Run.
Open the Source Packages node of the sample's project.
Browse a demo's source code to learn how a feature is implemented.
Feel free to modify the code samples and experiment! If you break something, you can always recreate the packaged samples from the JME3 Tests
template.
view online version