|
@@ -1,6 +1,6 @@
|
|
|
= Starting a JME3 application from the Commandline
|
|
|
-:author:
|
|
|
-:revnumber:
|
|
|
+:author:
|
|
|
+:revnumber:
|
|
|
:revdate: 2016/03/17 20:48
|
|
|
:keywords: documentation, install
|
|
|
:relfileprefix: ../
|
|
@@ -8,9 +8,9 @@
|
|
|
ifdef::env-github,env-browser[:outfilesuffix: .adoc]
|
|
|
|
|
|
|
|
|
-Although we recommend the jMonkeyEngine <<sdk#,SDK>> for developing JME3 games, you can use any IDE (integrated development environment) such as <<jme3/setting_up_netbeans_and_jme3#,NetBeans>> or <<jme3/setting_up_jme3_in_eclipse#,Eclipse>>, and even work freely from the commandline. Here is a generic IDE-independent “getting started tutorial.
|
|
|
+Although we recommend the jMonkeyEngine <<sdk#,SDK>> for developing JME3 games, you can use any IDE (integrated development environment) such as <<jme3/setting_up_netbeans_and_jme3#,NetBeans>> or <<jme3/setting_up_jme3_in_eclipse#,Eclipse>>, and even work freely from the commandline. Here is a generic IDE-independent "`getting started`" tutorial.
|
|
|
|
|
|
-This example shows how to set up and run a simple application (HelloJME3) that depends on the jMonkeyEngine3 libraries.
|
|
|
+This example shows how to set up and run a simple application (HelloJME3) that depends on the jMonkeyEngine3 libraries.
|
|
|
|
|
|
The directory structure will look as follows:
|
|
|
|
|
@@ -31,14 +31,14 @@ HelloJME3/src
|
|
|
|
|
|
== Installing the JME3 Framework
|
|
|
|
|
|
-To install the development version of jme3, link:http://updates.jmonkeyengine.org/stable/3.0/engine[download the nightly build], unzip the folder into a directory named `jme3`. The filenames here are just an example, but they will always be something like `jME3_xx-xx-2011`.
|
|
|
+To install the development version of jme3, download the latest link:https://github.com/jMonkeyEngine/jmonkeyengine/releases[stable release], unzip the folder into a directory named `jme3`. The filenames here are just an example, but they will always be something like `jME3.x-stable`.
|
|
|
|
|
|
[source]
|
|
|
----
|
|
|
|
|
|
mkdir jme3
|
|
|
cd jme3
|
|
|
-unzip jME3_01-18-2011.zip
|
|
|
+unzip jME3.1-stable.zip
|
|
|
|
|
|
----
|
|
|
|
|
@@ -46,16 +46,15 @@ Alternatively, you can build JME3 from the sources. (Recommended for JME3 develo
|
|
|
|
|
|
[source]
|
|
|
----
|
|
|
-
|
|
|
svn checkout https://jmonkeyengine.googlecode.com/svn/branches/3.0final/engine jme3
|
|
|
cd jme3
|
|
|
ant run
|
|
|
cd ..
|
|
|
-
|
|
|
----
|
|
|
|
|
|
-If you see a Test Chooser application open now, the build was successful. *Tip:* Use just `ant` instead of `ant run` to build the libraries without running the demos.
|
|
|
+If you see a Test Chooser application open now, the build was successful.
|
|
|
|
|
|
+TIP: Use just ant instead of ant run to build the libraries without running the demos.
|
|
|
|
|
|
== Sample Project Directory Structure
|
|
|
|
|
@@ -78,7 +77,7 @@ Next you copy the necessary JAR libraries from the download to your project. You
|
|
|
[source]
|
|
|
----
|
|
|
|
|
|
-mkdir HelloJME3/build
|
|
|
+mkdir HelloJME3/build
|
|
|
mkdir HelloJME3/lib
|
|
|
cp jme3/lib/*.* HelloJME3/lib
|
|
|
|
|
@@ -89,7 +88,7 @@ If you have built JME3 from the sources, then the copy paths are different:
|
|
|
[source]
|
|
|
----
|
|
|
|
|
|
-mkdir HelloJME3/build
|
|
|
+mkdir HelloJME3/build
|
|
|
mkdir HelloJME3/lib
|
|
|
cp jme3/dist/*.* HelloJME3/lib
|
|
|
|
|
@@ -123,7 +122,7 @@ public class HelloJME3 extends SimpleApplication {
|
|
|
public void simpleInitApp() {
|
|
|
Box b = new Box(Vector3f.ZERO, 1, 1, 1);
|
|
|
Geometry geom = new Geometry("Box", b);
|
|
|
- Material mat = new Material(assetManager,
|
|
|
+ Material mat = new Material(assetManager,
|
|
|
"Common/MatDefs/Misc/Unshaded.j3md");
|
|
|
mat.setColor("Color", ColorRGBA.Blue);
|
|
|
geom.setMaterial(mat);
|
|
@@ -141,7 +140,7 @@ We build the sample application into the build directory…
|
|
|
----
|
|
|
|
|
|
cd HelloJME3
|
|
|
-javac -d build -cp "lib/eventbus-1.4.jar:lib/j-ogg-oggd.jar:lib/j-ogg-vorbisd.jar:lib/jME3-lwjgl-natives.jar:lib/jbullet.jar:lib/jinput.jar:lib/lwjgl.jar:lib/stack-alloc.jar:lib/vecmath.jar:lib/xmlpull-xpp3-1.1.4c.jar:lib/jME3-blender.jar:lib/jME3-core.jar:lib/jME3-desktop.jar:lib/jME3-jogg.jar:lib/jME3-plugins.jar:lib/jME3-terrain.jar:lib/jME3-testdata.jar:lib/jME3-niftygui.jar:lib/nifty-default-controls.jar:lib/nifty-examples.jar:lib/nifty-style-black.jar:lib/nifty.jar:." src/hello/HelloJME3.java
|
|
|
+javac -d build -cp "lib/eventbus-1.4.jar:lib/j-ogg-oggd.jar:lib/j-ogg-vorbisd.jar:lib/jME3-lwjgl-natives.jar:lib/jbullet.jar:lib/jinput.jar:lib/lwjgl.jar:lib/stack-alloc.jar:lib/vecmath.jar:lib/xmlpull-xpp3-1.1.4c.jar:lib/jME3-blender.jar:lib/jME3-core.jar:lib/jME3-desktop.jar:lib/jME3-jogg.jar:lib/jME3-plugins.jar:lib/jME3-terrain.jar:lib/jME3-testdata.jar:lib/jME3-niftygui.jar:lib/nifty-default-controls.jar:lib/nifty-examples.jar:lib/nifty-style-black.jar:lib/nifty.jar:." src/hello/HelloJME3.java
|
|
|
|
|
|
----
|
|
|
|
|
@@ -154,9 +153,9 @@ cd build
|
|
|
java -cp "../lib/eventbus-1.4.jar:../lib/j-ogg-oggd.jar:../lib/j-ogg-vorbisd.jar:../lib/jME3-lwjgl-natives.jar:../lib/jbullet.jar:../lib/jinput.jar:../lib/lwjgl.jar:../lib/stack-alloc.jar:../lib/vecmath.jar:../lib/xmlpull-xpp3-1.1.4c.jar:../lib/jME3-blender.jar:../lib/jME3-core.jar:../lib/jME3-desktop.jar:../lib/jME3-jogg.jar:../lib/jME3-plugins.jar:../lib/jME3-terrain.jar:../lib/jME3-testdata.jar:../lib/jME3-niftygui.jar:../lib/nifty-default-controls.jar:../lib/nifty-examples.jar:../lib/nifty-style-black.jar:../lib/nifty.jar:." hello/HelloJME3
|
|
|
----
|
|
|
|
|
|
-Note: If you use Windows, the classpath separator is “; instead of “:.
|
|
|
+NOTE: If you use Windows, the classpath separator is kbd:[\ ] instead of kbd:[/].
|
|
|
|
|
|
-If a settings dialog pops up, confirm the default settings. You should now see a simple window with a 3-D cube. Use the mouse and the WASD keys to move. It works!
|
|
|
+If a settings dialog pops up, confirm the default settings. You should now see a simple window with a 3-D cube. Use the mouse and the WASD keys to move. It works!
|
|
|
|
|
|
|
|
|
== Recommended Asset Directory Structure
|
|
@@ -192,7 +191,7 @@ import com.jme3.scene.Spatial;
|
|
|
|
|
|
----
|
|
|
|
|
|
-You will learn more about the asset manager and how to customize it later. For now feel free to structure your assets (images, textures, models) into further sub-directories, like in this example the `assets/models/Elephant` directory that contains the `elephant.meshxml` model and its materials.
|
|
|
+You will learn more about the asset manager and how to customize it later. For now feel free to structure your assets (images, textures, models) into further sub-directories, like in this example the `assets/models/Elephant` directory that contains the `elephant.mesh.xml` model and its materials.
|
|
|
|
|
|
|
|
|
== Next Steps
|