jAER Developer setup
Please read the developer guidelines!
If you plan to develop Java classes you will need a Java development environment and the Java development kit (JDK).
The project is presently built with Netbeans. We are currently using netbeans 6.x.
The JDK and Netbeans come bundled together as a Netbeans bundle. Remember to download the bundle of Netbeans and the Java JDK, unless you already have the latest JDK installed.
If you are not a Java developer already, you will need to get both the JDK and a development environment.
You can try to use another development environment, e.g. Eclipse, but then you will need to build the project.
You may be confused by the plethora of Java versions: What you need is plain old J2SE (Java 2 Standard Edition), not J2EE or any other Java bundle.
Subversion command line client for Netbeans integration of SVN.
To use the very convenient built-in subversion support in Netbeans, you will still need to install some command line subversion client that netbeans will call. You may also need to do this if you get the error that your working copy is too new for the Netbeans SVN client.
For subversion client downloads see http://www.sliksvn.com/en/download.
For Windows we recommend SlikSVN builds found here: http://www.sliksvn.com/en/download.
In Netbeans, the svn client is configured from Tools/Options/Versioning/Subversion.
Netbeans development environment and opening the project
The netbeans project is located at host\java\.
You can open this project from the File/Open project menu. You may then need to fix some reference problems. You can ignore the error about build/classes missing because your first build will generate this folder.
- Open the Project properties by right-clicking the project and selecting Properties.
- Then select the Libraries tab and remove all libraries that are missing.
- Now add in all the jars in host/jars
Now you should be able to build and run the project..
Netbeans startup options to avoid OpenGL and DirectDraw conflicts.
You may notice flashing in the netbeans IDE while you run the CaviarViewer. This probably is a result of simultaneous use of OpenGL resources by netbeans and CaviarViewer. To avoid this, use the following switches in the Netbeans configuration file, which is located at C:\Program Files\netbeans-5.0\etc\netbeans.conf:
# options used by netbeans launcher by default, can be overridden by explicit # command line switches netbeans_default_options="-J-Xms32m ... **-J-Dsun.java2d.opengl=false -J-Dsun.java2d.noddraw=true**"
These switches turn off opengl rendering for the JVM running netbeans and prevent a conflict between windows direct draw and opengl. (I'm not sure about exactly what switches are necessary but these prevent the flashing.)
Third party jars
All the external jars are in the host\java\jars folder. If you get a problem with missing libraries in netbeans, add the jars in this folder to the your jAER netbeans project.
Java path to native libraries
The java path to native libraries is set in the netbeans project properties in the project Run property. All the native libraries are in the project folder host\jars. The program launcher scripts include the runtime property -Djava.library.path=jars and are started from the host\java folder.
Building
In Netbeans, from the Build menu you can do a Clean and build main project to recompile all classes and rebuild the jar file. The output should look something like the following. You can ignore the warning messages and you may get an error from svnversion if you have not installed a command line subversion client.
init:
deps-clean:
Deleting directory C:\Documents and Settings\tobi\My Documents\~jAER-sourceForge\trunk\host\java\build
clean:
init:
deps-jar:
Created dir: C:\Documents and Settings\tobi\My Documents\~jAER-sourceForge\trunk\host\java\build\classes
Compiling 248 source files to C:\Documents and Settings\tobi\My Documents\~jAER-sourceForge\trunk\host\java\build\classes
C:\Documents and Settings\tobi\My Documents\~jAER-sourceForge\trunk\host\java\src\ch\unizh\ini\caviar\eventprocessing\tracking\EllipseTracker.java:13: **warning**: com.sun.org.apache.xerces.internal.impl.xpath.regex.Match is Sun proprietary API and may be removed in a future release
import com.sun.org.apache.xerces.internal.impl.xpath.regex.Match;
C:\Documents and Settings\tobi\My Documents\~jAER-sourceForge\trunk\host\java\src\ch\unizh\ini\caviar\eventprocessing\tracking\HoughEyeTracker.java:13: **warning**: com.sun.org.apache.xerces.internal.impl.xpath.regex.Match is Sun proprietary API and may be removed in a future release
import com.sun.org.apache.xerces.internal.impl.xpath.regex.Match;
C:\Documents and Settings\tobi\My Documents\~jAER-sourceForge\trunk\host\java\src\ch\unizh\ini\caviar\graphics\AEViewer.java:939: **warning**: sun.swing.FilePane is Sun proprietary API and may be removed in a future release
if(comp.getClass().getEnclosingClass()==sun.swing.FilePane.class){
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 warnings
Copying 47 files to C:\Documents and Settings\tobi\My Documents\~jAER-sourceForge\trunk\host\java\build\classes
compile:
setBuildVersion:
Making build version file build/classes/ch/unizh/ini/caviar/BUILDVERSION.txt
subversion.revisionNumber=108:113M
build.date=20070706 at 0959
**Building jar: C:\Documents and Settings\tobi\My Documents\~jAER-sourceForge\trunk\host\java\dist\jAER.jar**
**Java application wrapped in ..\jAERViewer.exe**
Java application wrapped in ..\utilities\jAERLauncher.exe
jar:
BUILD SUCCESSFUL (total time: 8 seconds)