|
|
@@ -1,10 +1,11 @@
|
|
|
-= Setting up JME3 in Netbeans 6.x
|
|
|
+= Setting up JME3 in Netbeans 8.x
|
|
|
:author:
|
|
|
:revnumber:
|
|
|
:revdate: 2016/03/17 20:48
|
|
|
:keywords: documentation, install
|
|
|
:relfileprefix: ../
|
|
|
:imagesdir: ..
|
|
|
+:experimental:
|
|
|
ifdef::env-github,env-browser[:outfilesuffix: .adoc]
|
|
|
|
|
|
|
|
|
@@ -24,67 +25,69 @@ Note that the jMonkeyEngine SDK is built in top of the NetBeans Platform, and is
|
|
|
|
|
|
The currently available JAR binaries are the nightly builds.
|
|
|
|
|
|
-. Download the most recent zipped build from link:http://nightly.jmonkeyengine.org/[http://nightly.jmonkeyengine.org/]
|
|
|
-. Unzip the file and save it as `jME3_xx-xx-2010` in your NetBeansProjects directory. You should see the following files and directories:
|
|
|
+. Download the most recent zipped build from link:https://github.com/jMonkeyEngine/jmonkeyengine/releases[https://github.com/jMonkeyEngine/jmonkeyengine/releases]
|
|
|
+. Unzip the file and save it as `jME3.1-stable` in your NetBeansProjects directory. You should see the following files and directories:
|
|
|
.. `lib/` – The jMonkeyEngine binaries and libraries. (Don't remove.)
|
|
|
-.. `TestChooser.exe` – Run this file to see various feature demos. (optional)
|
|
|
+.. `jMonkeyEngine3.jar` – Run * Optional: Configuring the JavaDoc Popups in NetBeans and source file
|
|
|
+this executable jar file to see various feature demos. (optional)
|
|
|
.. `javadoc/` – jME3 +++<abbr title="Application Programming Interface">API</abbr>+++ documentation. (optional)
|
|
|
-
|
|
|
+.. `sources/` - jME3 source files. (optional)
|
|
|
|
|
|
|
|
|
== Creating a Project
|
|
|
|
|
|
-In NetBeans, choose File > New Project, select Java > Java Application, click Next.
|
|
|
+In NetBeans, choose `menu:File[New Project]`, select `menu:Java[Java Application]`, click btn:[Next].
|
|
|
|
|
|
* Project Name: HelloJME3
|
|
|
* Project Location: ~/NetBeansProjects
|
|
|
-* Create main() Class: No
|
|
|
-* Set as Main Project: Yes.
|
|
|
-* Click Finish
|
|
|
+* Create main() Class: Yes
|
|
|
+//* Set as Main Project: Yes.
|
|
|
+* Click btn:[Finish]
|
|
|
|
|
|
The new project appears in the Projects window.
|
|
|
|
|
|
|
|
|
== Setting up Dependencies
|
|
|
|
|
|
-Your project depends on the jMonkeyEngine libraries and needs to know where they are.
|
|
|
-
|
|
|
-. In the Projects window, right-click the project's Libraries node and choose “Add JAR/Folder.
|
|
|
-. In the “Add JAR/Folder dialog, browse to the `NetBeansProjects/jME3_xx-xx-2010` directory.
|
|
|
-. Select all JARs in `lib/` and click Select.
|
|
|
-
|
|
|
-The necessary libraries are now on the classpath and should appear in the Libraries list.
|
|
|
-
|
|
|
-
|
|
|
-== Optional: Configuring the JavaDoc Popups in NetBeans
|
|
|
-
|
|
|
-Configuring Javadoc popups for jme3 classes in NetBeans can be very helpful during the development phase of your game.
|
|
|
-
|
|
|
-. In the HelloJME3 project
|
|
|
-.. Right-click the Libraries node and choose Properties from the context menu
|
|
|
-.. Select the jMonkeyEngine3.jar library entry from the list and click Edit.
|
|
|
-... Javadoc: Browse to JME3's `javadoc` directory and click select.
|
|
|
-... Sources: Browse to JME3's `src`directory and click select.
|
|
|
-
|
|
|
-.. Click OK.
|
|
|
-
|
|
|
-
|
|
|
-Open a class of your HelloJME3 project, place the caret into a jme3 class, and press ctrl-space to see the javadoc popup, as well as code-completion.
|
|
|
+Your project depends on the jMonkeyEngine libraries and needs to know where they are. We will create a global library so you can use it for other projects without having to re-configure everything. You only do this one time.
|
|
|
+
|
|
|
+. In the Projects window of the HelloJME3 project, btn:[Right Mse Btn] click the project's `Libraries` node and choose `Add Library`.
|
|
|
+. In the `Add Library` dialog, click the btn:[Create] button.
|
|
|
+. For the `Library Name` enter "`jME3.1-stable`".
|
|
|
+. For the `Library Type` select `Class Libraries`.
|
|
|
+. Click btn:[OK] and the `Customize Library` dialog will open.
|
|
|
+. In the `Classpath` tab, click the btn:[Add Jar/Folder] button and navigate to the `lib/` directory located in your `~/NetBeansProjects/jME3.1-stable` folder.
|
|
|
+. Select all JARs in `lib/` and when done click the btn:[Add Jar/Folder] button.
|
|
|
+* Optional: Configuring the `Source File` editor for NetBeans.
|
|
|
+** In the `Sources` tab, click the btn:[Add Jar/Folder] button and navigate to the `sources/` directory located in your `~/NetBeansProjects/jME3.1-stable` folder.
|
|
|
+** Select all JARs in `sources/` and when done click the btn:[Add Jar/Folder] button.
|
|
|
+* Optional: Configuring the JavaDoc Popups in NetBeans.
|
|
|
+** In the `Javadoc` tab, click the btn:[Add ZIP/Folder] button and navigate to the `javadoc/` folder located in your `~/NetBeansProjects/jME3.1-stable` folder.
|
|
|
+** Select the `javadoc/` folder but do not enter the directory, the `File Name` will change to `javadoc`. Click the btn:[Add ZIP/Folder] button to close the dialog.
|
|
|
+. Click the btn:[OK] button, next click the btn:[Add Library] to create the library.
|
|
|
+
|
|
|
+The necessary libraries are now on the classpath and should appear in the Libraries list. You now have a global library you can add to any project.
|
|
|
+
|
|
|
+[INFORMATION]
|
|
|
+====
|
|
|
+If you configured your library with sources and javadocs, open a class of your HelloJME3 project, place the caret into a jme3 class, and press kbd:[Ctrl] + kbd:[Space] to see the javadoc popup, as well as code-completion.
|
|
|
|
|
|
+To open the source file editor, btn:[Rignt Mse Btn] click on any jME3 class or method, then select `menu:Navigate[Go To Source]`.
|
|
|
+====
|
|
|
|
|
|
== Build & Run Tips in NetBeans
|
|
|
|
|
|
How to build and run in NetBeans:
|
|
|
|
|
|
-* Clean and build the whole project by pressing Shift-F11.
|
|
|
-* Run any file that is open in the editor and has a main() class by pressing Shift-F6.
|
|
|
-* Run the Main class of the project by pressing F6.
|
|
|
+* Clean and build the whole project by pressing kbd:[Shift] + kbd:[F11].
|
|
|
+* Run any file that is open in the editor and has a main() class by pressing kbd:[Shift] + kbd:[F6].
|
|
|
+* Run the Main class of the project by pressing kbd:[F6].
|
|
|
|
|
|
Tips for configuring the main class in NetBeans:
|
|
|
|
|
|
-* Right-click the HelloJME3 project and choose “Set as main project. Now you can use the toolbar buttons (clean&build, run, debug, etc) to control this project.
|
|
|
-* Right-click the HelloJME3 project and choose Properties. Go to the Run section.
|
|
|
-* Under Main Class, specify the class that will be executed when you run the whole project. For now, enter `hello.HelloJME3`.
|
|
|
+* btn:[Right Mse Btn] select the HelloJME3 project and choose "`Set as main project`". Now you can use the toolbar buttons (clean&build, run, debug, etc) to control this project.
|
|
|
+* btn:[Right Mse Btn] select the HelloJME3 project and choose `Properties`. Go to the `Run` section.
|
|
|
+** Under Main Class, specify the class that will be executed when you run the whole project. For now, enter `hellojme3.HelloJME3`.
|
|
|
|
|
|
|
|
|
== Writing a SimpleApplication
|