NyARToolkit for Java (installation instructions for NetBeans)
I am assuming that you have a properly installed and working camera and a printer to print the âpatternsâ or whichever way of having a printed copy of the patterns.
1. Download and install the latest Java SE from http://java.sun.com/javase/downloads/index.jsp
2. Download and install the latest NetBeans IDE from http://netbeans.org/
3. Download the latest Java Media Framework from http://java.sun.com/javase/technologies/desktop/media/jmf/ (near the bottom of the page is the link Download JMF). Choose Windows as the platform, check the box and click Continue. In the next screen click on the first file jmf-2_1_1e-windows-i586.exe (Windows Performance Pack) to download it. Double click and follow setup instructions to install it.
4. Download the latest version of the zip binaries file Java 3D for windows (at the time these instructions were written this was j3d-1_5_2-windows-i586.zip) from https://java3d.dev.java.net/binary-builds.html
5. Download the latest NyARToolkit zip file from the NyARToolkit for Java - NyARToolkit Core section (at the time these instructions were written this was NyARToolkit-2.4.2.zip) from  http://sourceforge.jp/projects/nyartoolkit/releases/
By now you must have installed the required Java SE, NetBeans IDE and Java Media Framework and you must also have the j3d-1_5_2-windows-i586.zip and the NyARToolkit zip files downloaded somewhere.
6. Create a new Java Application project in NetBeans. Name it as you wish, say JNyAR.
7. Unzip the NyARToolkit zip file somewhere and copy and paste the following folders in the src folder of the project you just created:
a) [NyARToolkit-2.4.2]/src/jp
b) [NyARToolkit-2.4.2]/src.utils/java3d/jp
c) [NyARToolkit-2.4.2]/src.utils/jmf/jp
d) [NyARToolkit-2.4.2]/sample/java3d/jp
e) [NyARToolkit-2.4.2]/sample/jmf/jp
Be careful to copy only the jp folder of each path mentioned above. When copying and pasting the folder from the paths b, c, d and e windows will tell you that there is a jp folder already. Choose to overwrite.
8. Create a lib folder in the JNyAR project. Unzip the j3d zip file somewhere. There will be another zip file called j3d-jre.zip. Unzip it also somewhere (I created the folder C:\Program Files\Java\j3d-1.5.2 and unzipped it in there) and copy the 3 jar files that are inside the /lib/ext folder (j3dcore.jar, j3dutils.jar, vecmath.jar) in the lib folder of your NetBeans project.
9. Add to the end of the PATH variable the path to the bin folder of the j3d you unzipped in step 8. In my case I added the text â;C:\Program Files\Java\j3d-1.5.2\binâ (without the ââ). Also the installation process of the Java Media Framework should have changed the CLASSPATH variable adding the path to the JMF installation folder and should have added a JMFHOME variable.
*Warning: Be care full when you mess up with the system variables.
10. Right click in the Libraries of your NetBeans project and choose Add JAR/Folder. Choose the 3 .jars you copied in step 8 from the /lib folder and click open. This will add the jars to the classpath of your project.
11. Do the same as in step 10 but this time choose the jars located in the [Path to installed JMF] \lib (for me that was the jars located in folder C:\Program Files\Java\JMF2.1.1e\lib)
12. Finally, copy the Data folder of the NyARToolkit zip file in the same folder that the NetBeansProjects folder resides (or if you prefer put it inside the project folder but change the path of the variables that use the files in the Data folder accordingly - like for example the variables CARCODE_FILE and PARAM_FILE in class NyARJava3D.java)
13. You are done. If all have gone well you should be able to build the project without errors. Print the file pattHiro.pdf, run the file jp/nyatla/nyartoolkit/java3d/sample/NyARJava3D.java and when the image from the camera appears hold the paper in front of the camera.