Results 1 to 3 of 3
- 12-28-2010, 12:46 AM #1
Member
- Join Date
- Dec 2010
- Posts
- 5
- Rep Power
- 0
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
- 12-29-2010, 03:41 AM #2
Member
- Join Date
- Dec 2010
- Posts
- 5
- Rep Power
- 0
I noticed that someone had a similar problem on this closed thread: Download java 3d lib
I tried adding the .jar files for the Java3D to the NetBeans. Tools --> Libraries --> New Library --> Add Jar/Folder
I also tried adding these to a folder in my JDK, not sure which one anymore... :/ :D
Still NetBeans can not see the Java3D packages or classes or whatever. Any help would be greatly appreciated, it may be the only way I can get ET back home.
I am going over this page on classpaths: Managing Source and Class Files (The Java™ Tutorials > Learning the Java Language > Packages) - as the one at JavaRanch, recommended in the closed thread, does not apply to Vista OS
- 12-31-2010, 06:57 AM #3
Member
- Join Date
- Dec 2010
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
Error : Invalid path, \bin\javac.exe -classpath
By Ed in forum JCreatorReplies: 3Last Post: 08-14-2009, 12:57 PM -
how to set path and classpath on vista
By pradnya in forum New To JavaReplies: 6Last Post: 07-17-2009, 06:39 PM -
Setting classpath in Vista
By dawiz001 in forum New To JavaReplies: 2Last Post: 02-25-2009, 05:00 PM -
Path and classpath
By nisheeth in forum New To JavaReplies: 2Last Post: 12-23-2008, 12:07 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks