[java] Java3D - Loader3DS/package problem

Started by
1 comment, last by GameDev.net 19 years, 5 months ago
Hi! I am new in Java3D and Java at all. I want to load a 3DS model and show it on screen. But before I even started I have encountered a problem. There is "StarfireExt.jar" file, it is writen in Readme.txt", that should be put into the "ext" directory of Java SDK and also Runtime Environment. So far I have put the "StarfireExt.jar" file wherever I could but when I call "import com.mnstarfire.loaders3d.Inspector3DS;" NetBeans points to that with an error: "Package import com.mnstarfire.loaders3d does not exist". What should I do? Package can be found here: http://www.j3d.org/utilities/loaders/3ds/deford.html Or does anyone have and experience with any 3DS loader using Java3D? [Edited by - AcoGL on November 15, 2004 7:10:53 AM]
Advertisement
Not sure if that helps you, but you have to make sure that all .jar files (no matter where they are stored) are included in the classpath during compilation.

For example: If you have a java-file "MyClass.java" which imports a class from a .jar file called "FantasticJar", say for example "com.company.TheirClass", you have to call the javac with:

javac -cp pathToFantasticJar;... MyClass.java

where ... stands for other files or directories on the classpath.
Note that the ";" as a delimiter between the dirs is system-dependent.

I am not sure how to specify the classpath using NetBeans, but there has to be a way. However, to check if that is the problem, you can simply try to compile your class using the command line.

Good luck!
For the classpath Netbeans 4.0 Beta 2, just go to the Projects tab, right click on your project and select Properties.

Once the dialog box pops up, select Classpath from the list on the lift then click on Add Jar/Folder... (You can add multiple jars at once).

If you're using an earlier version of Netbeans, I'm sure there was a similar process when you right click on the mounted file system.

This topic is closed to new replies.

Advertisement