Jirr&Netbeans Link Error

Discussion about Irrlicht's Java wrapper
Post Reply
sgalland
Posts: 5
Joined: Fri Dec 08, 2006 3:32 am

Jirr&Netbeans Link Error

Post by sgalland »

Hello all,

I am trying to compile TestHelloWorld.java in Netbeans and its giving me a link error. I can do it in JCreator just fine but the group of people I am working with made a choice to work in Netbeans and I did add the JAR file to the compile library section. Here is the error:

init:
deps-jar:
compile:
run:
java.lang.UnsatisfiedLinkError: no irrlicht_wrap in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at main.TestHelloWorld.<clinit>(TestHelloWorld.java:106)
Exception in thread "main"
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

I put the DLL's with the class that was generated and it is the exact TestHelloWorld.java file from the Jirr website. Any ideas?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I used to use Jirr with Netbeans 3.5.. ancient i know but it's what i got used to and then couldn't make the change to the new netbeans with my project because it wasn't very backward compatible i found.

The way my projects were set up was to mount the .jar archive and also the folder which contained my projects classes and in that folder would be the 2 .dlls. Also you'd have to set up the working directory to be the one containing your .dlls... You do that somewhere in the options, in 3.5 it was as follows:

tools->options->debugging & executing->execution types->external execution, then click on the expert tab and select the folder containing the .dlls to be your working directory.

Though i'm sure it's changed a bit in the version you'll be using it should be similarish. And if your friends use netbeans they should know how to set the working directory.

Hope that solves your problem!
Image Image Image
sgalland
Posts: 5
Joined: Fri Dec 08, 2006 3:32 am

Post by sgalland »

Hey thanks, in Netbeans 5.5 all I had to do was right click the project, go to properties, go to run, and set my working directory to where my class files are compiling to, copied the DLL's there and whala!

Thanks!
sgalland
Posts: 5
Joined: Fri Dec 08, 2006 3:32 am

Post by sgalland »

I had a wierd side effect, the frames per second when compiled from JCreator is 3000FPS, and the frames when compiled from Netbeans is about 25, any idea on what would cause that with the exact same code and the exact same files being added to the linker?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I'm sure 3000 must be a typo! :lol:

I've heard that Netbeans is a bit of a resource whore.. so possibly merely using netbeans is causing problems. You could try running it from the command prompt to see if that made any difference. if so then it's no big deal and you can use netbeans to develop the program as it will run fine when you release it without netbeans running it, but if it's actually netbeans causing it to be compiled in some horrible way then that's a bigger issue! :lol:
Image Image Image
jestermax
Posts: 17
Joined: Mon Feb 26, 2007 4:36 pm

Post by jestermax »

JCreator's lack of resource hogging makes it very nice while working with code like this. It DOES require you to be somewhat of a better coder as it features no debugging so you're on your own that way, and i've had some issues with the project management but i think the good things outweigh the bad.
Post Reply