Java3D, Classpath, Path, Vista, and NetBeans
Hi,
I installed Java3D class to my hard-drive and re-configured my classpath and path in the environment variables section in my control panel (I am running Vista OS).
The install instructions I used for the classpath and path were found in the download in the .zip file for the 3D class for 32bit windows at this location: https://java3d.dev.java.net/
Then I reconfigured the Path, also in the environment variables following said instructions...
I am following along a book, Killer Game Programming in Java, with a tutorial and am having problems getting one of the sample programs to compile and run that I am working on:
Here is the code for said tutorial from said book:
import com.sun.j3d.utils.timer.J3DTimer;
public class TimerRes {
public static void main(String args[])
{
j3dTimeResolution();
sysTimeResolution();
perfTimeResolution();
}
private static void j3dTimeResolution()
{
System.out.println("Java 3D Timer Resolution: " +
J3DTimer.getResolution() + " nsecs");
}
private static void sysTimeResolution()
{
long total, count1, count2;
count1 = System.currentTimeMillis();
count2 = System.currentTimeMillis();
while(count1 == count2)
count2 = System.currentTimeMillis();
total = 1000L * (count2 - count1);
count1 = System.currentTimeMillis();
count2 = System.currentTimeMillis();
while(count1 == count2)
count2 = System.currentTimeMillis();
total += 1000L * (count2 - count1);
count1 = System.currentTimeMillis();
count2 = System.currentTimeMillis();
while(count1 == count2)
count2 = System.currentTimeMillis();
total += 1000L * (count2 - count1);
count1 = System.currentTimeMillis();
count2 = System.currentTimeMillis();
while(count1 == count2)
count2 = System.currentTimeMillis();
total += 1000L * (count2 - count1);
System.out.println("System Time resolution: " +
total/4 + "microsecs");
}
private static void perfTimeResolution()
{
StopWatch sw = new StopWatch();
System.out.println("Perf Resolution: " +
sw.getResolution() + " nsecs");
sw.start();
long time = sw.stop();
System.out.println("Perf Time " + time +
" nsecs");
}
}
**Note - What is highlighted in yellow has a red squiggly line under it in NetBeans, indicating an error.
My classpath is: .;es;C:\Program Files\Java\jdk1.6.0_19\lib;C:\Program Files\Java\jre6\lib\ext\QTJava.zip.;C:\Users\YourN ame\J3D\lib\ext\j3dcore.jar;C:\Users\YourName\J3D\ lib\ext\j3dutils.jar;C:\Users\YourName\J3D\lib\ext \vecmath.jar
* I am 90% sure that the problem is with incorrect syntax of this classpath.
My path is: bin;C:\Program Files\Java\jdk1.6.0_19/bin;C:\Program Files\QuickTime\QTSystem\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Users\YourName\J3D\lib\i38 6
I am using NetBeans 6.9.1
Any help would be awesome. :D