Lwjgl.dll already loaded in another classloader SOLVED

ok, after being told i should learn java first i started another approach to the jME, with another tutorial and the game loop now throws an UnsatisifiedLinkError exception, and no, it's not the noob one.

it only occurs every third time, after the application ran succesful one time. after the exception occured, the app wont start (it stops after error log says INFO: Read properties) and then again it works, exception, wont start, and so on…

i searched through the forums, first this one, then googled it, but i could only find people having problems with their completely own stuff, as it seems. im using BaseGame and therefore got no clue why the classloader is loading the native library twice or more, and i also don't wanna research for 10 or more hours through the source, so it would be cool if someone who had this problem once could tell me how he solved it.

and no one telling me i should learn java first, i had it for half a year in school, for hours a week and should now be ready for a bigger project as i think. (it isnt even a big project, its just a tutorial  :|)

thanks

What's about the demos? Do they work anytime you start them with BlueJ?

sounds like another instance of the game is still running or did not shut down completely.

hm, yea, but i did everything as described here

=jme2&s[]=moving&s[]=away&s[]=simplegame&s[]=own&s[]=app]http://www.jmonkeyengine.com/wiki/doku.php?id=jme2_-_flag_rush_tutorial_series&s[]=jme2&s[]=moving&s[]=away&s[]=simplegame&s[]=own&s[]=app



maybe it’s BlueJ’s “fault”? but i cant get Javac or jikes to compile that stuff…



EDIT: could it be a similar problem to this? but i dont really understand what they mean with daemon thread…

the demos do always work… is there maybe a function like Renderer.shutdown() to remove the ClassLoader that loads the natives? i already tried Renderer.cleanup(), but it seems that the DisplaySystem is already gone when the function cleanup() of BaseGame is called (and maybe it isnt even related, dunno…)

so if the demos work the question is where is the difference between the demos and the application that is not working properly. Maybe you can post your code somehow!?

yea, sure…

this is it, i parted it in two classes to have a better overview, flagrushtutmain.txt has the main class (still named lesson2, but im done with the "loading the terrain" section of the tutorial) and the object-holding class, well, Objectholder  :stuck_out_tongue:

um, okay, just saw i forgot to attach the files, anyway… i compared my source to the one from the jME source (the tutorial files are included there) and noticed that the tutorial doesnt mention to implement a method

protected void quit() {
super.quit();
System.exit(0);
}


the missing quit() method was causing the bugged behaviour, so now its solved, but maybe the quit method should be used earlier... (call for someone to edit the tutorial  XD)
thanks anyways
EvilTwin said:

the missing quit() method was causing the bugged behaviour, so now its solved, but maybe the quit method should be used earlier... (call for someone to edit the tutorial  XD)
thanks anyways


Anyone with a wiki account can edit the tutorial :D (yes, anyone can register for a wiki account)..  If you think you've got a better way of doing it, test it out a bit and ask the original author about changing the tutorial (if it was your own you could do whatever you want, but it's a professional courtesy to the author)

Good to hear your problem got sorted out though!