<h1><a>Setting up a svn checkout of the jME3 Engine</a></h1>
<div>
<p>
You are welcome to try out the new jME3, and contribute patches and features! This document shows how to download, set up, build, and run the latest development version from the sources. (As of Early 2010, we are in pre-alpha.)
</p>
<p>
<br/>
You are welcome to try out the new jME3, and contribute patches and features! This document shows how to download, set up, build, and run the latest development version from the sources.
</p>
<p>
@ -23,11 +18,10 @@ Note: In the following, always replace ”~” with the path to your home direct
<p>
Check out the sources form the repository. (The following NetBeans instructions are equivalent to executing <code>cd ~/NetBeansProjects; svn checkout <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://jmonkeyengine.googlecode.com/svn/branches/jme3"><paramname="text"value="<html><u>http://jmonkeyengine.googlecode.com/svn/branches/jme3</u></html>"><paramname="textColor"value="blue"></object></code> on the commandline.)
Check out the sources from the repository.
</p>
<ol>
<li><div> In NetBeans go to Team > Subversion > Checkout</div>
<li><div> In jMonkeyPlatform go to Team > Subversion > Checkout</div>
If you should see any red exclamation marks on packages, look at the Troubleshooting section below.
</p>
</div>
<h3><a>Optional: Setting up JOAL and JOGL</a></h3>
<div>
<p>
This steps configures two optional libraries: JOAL for Audio, and JOGL as back-up option for older GPUs. (This step is recommended, but you can skip it if you know what are are doing.)
</p>
<ol>
<li><div> Open the jme3's project properties from the Projects window, and go to the Run category.</div>
</li>
<li><div> Under VM Options, enter the following, depending on your operating system. <em>(Replace 32 with 64 if applicable.)</em></div>
<strong>Important</strong>: When copying from the wiki, make certain to use normal quotation marks, not the curly ones.
</p>
</div>
<h3><a>Optional: Setting up Android Support</a></h3>
<div>
<p>
Work in progress …
</p>
<p>
A jme3 application can either be deployed to the desktop (as Java Swing application) and web browser (as JNLP/WebStart or Applet), or to an Android phone. While the former is the default, switching to Android deployment can be done in a few steps.
</p>
<ol>
<li><div> Open Project Properties, go to Sources category.</div>
</li>
<li><div> At Source Packages Folders, click “Add Folder”. </div>
Sample code for cool features is in the <code>src/jme3_test</code> folder. A sample game can be found in <code>jme3_games/jme3game/cubefield/CubeField.java</code>.
</p>
<p>
Tips:
</p>
<ul>
<li><div> To run runnable classes from the Projects window, right-click and choose Run.</div>
</li>
<li><div> To run any runnable class that is open in the editor, press shift-F6.</div>
</li>
</ul>
</div>
<h2><a>Optional: Javadoc Popups and Source Navigation in NetBeans</a></h2>
<div>
<p>
If you are working on the jme3 sources:
</p>
<ol>
<li><div> In the Projects window, right-click the jme3 project and choose Generate Javadoc. Wait.</div>
</li>
<li><div> Confirm in the Files window that the javadoc has been created in <code>~/NetBeansProjects/jme3/dist/javadoc</code></div>
</li>
<li><div> In the editor, place the caret in a jme class and press ctrl-space to view javadoc.</div>
</li>
</ol>
<p>
If you are working on a game project that depends on jme3:
</p>
<ol>
<li><div> First follow the previous tip. (In the future, we may offer jme javadoc as download instead.)</div>
</li>
<li><div> In your game project, right-click the Libraries node and choose “Properties”.</div>
</li>
<li><div> In the Library properties, select jme3.jar and click the Edit button.</div>
<ol>
<li><div> For the Javadoc field, browse to <code>~/NetBeansProjects/jme3/dist/javadoc</code>. Check “as relative path” and click select.</div>
</li>
<li><div> For the Sources field, browse to <code>~/NetBeansProjects/jme3/src</code>. Check “as relative path” and click select.</div>
</li>
<li><div> Click OK.</div>
</li>
</ol>
</li>
<li><div> In the editor, place the caret in a jme class and press ctrl-space to view javadoc. Ctrl-click any jme3 method to jump to its definition in the sources. </div>
</li>
</ol>
<p>
This tip works for any third-party JAR library that you use. (You may have to download the javadoc/sources from their home page separately).
</p>
</div>
<h2><a>Troubleshooting</a></h2>
<div>
<p>
<strong>Cannot Find Symbol SwingWorker </strong> compile errors, and red exclamation marks on some package icons? SwingWorker is part of JDK6 but not JDK5. If you get this error, you have two options to fix it:
</p>
<ul>
<li><div> Make sure you have JDK6 installed, and switch the jme3 project to JDK6. </div>
<ol>
<li><div> In NetBeans, register the JDK6 in the “Tools > Java Platform” manager.</div>
</li>
<li><div> Open the jme3 Project Properties, and switch the <acronymtitle="Java Development Kit">JDK</acronym> settings in the “Sources” and “Libraries” sections to JDK6.</div>
</li>
<li><div> Clean and Build.</div>
</li>
</ol>
</li>
<li><div> Alternatively, if you must stay with JDK5:</div>
<ol>
<li><div> Temporarily remove the directory <code>jme3_tools/deploy</code>. </div>
</li>
<li><div> Clean and Build.</div>
</li>
</ol>
</li>
</ul>
<p>
<br/>
</p>
<hr/>
<p>
<br/>
</p>
<p>
Sources used: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/jmonkeyengine/wiki/BuildJme3"><paramname="text"value="<html><u>BuildJme3</u></html>"><paramname="textColor"value="blue"></object>, <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.jmonkeyengine.com/forum/index.php?topic=13108.0"><paramname="text"value="<html><u>netbeans tutorial from forum</u></html>"><paramname="textColor"value="blue"></object>