compiling hello world

Discussion about Irrlicht's Java wrapper
Post Reply
fireside
Posts: 158
Joined: Thu Dec 01, 2005 10:55 pm

compiling hello world

Post by fireside »

I'm trying to compile the hello world example. I made a directory and put in it:
jirr13, irrlicht.dll, irrlicht_wrap.dll, sidney.md2, sidney.bmp, TestHelloWorld.java

I changed the media path to just the files. I tried to compile as in the readme, but the code looks for a package:
import net.sf.jirr.*;

The readme says : javac -classpath .;jirr13.jar *.java

I set my path for java in windows xp and typed
javac -classpath .;jirr13.jar *.java

I get a lot of errors.
fireside
Posts: 158
Joined: Thu Dec 01, 2005 10:55 pm

Post by fireside »

I needed the net folder.

Now it compiles but won't run.

java -classpath ./jirr13.jar TestHelloWorld
Exception in thread "main" java.lang.NoClassDefFoundError: TestHelloWorld

I tried
java -classpath .jirr13.jar TestHelloWorld
but same thing.

I'm rusty on java, I admit. There's a TestHelloWorld.class in the directory.

I added a semicolon after -classpath .;
and got this:

Exception in thread "main" java.lang.UnsatisfiedLinkError: E:\My Documents\jirrProject\irrlicht_wrap.dll: Can't find dependen
t libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at TestHelloWorld.<clinit>(TestHelloWorld.java:95)
fireside
Posts: 158
Joined: Thu Dec 01, 2005 10:55 pm

Post by fireside »

Ok, got it. I needed that directX.dll I think. The readme has a typo, though, I think. There's a / where there's supposed to be a ; in the java execute command.
Post Reply