Can't get jME to compile in netbeans

hi, I've been sitting here for several hours now trying to make it work, but it's always something that doesn't work. Now latest I tested to follow the following guide: http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_netbeans_6.7_for_jme_2.0



But it didn't work… I did all the steps except the path for the native libraries, since there isn't any folder for that in the newest version of jME…



Before that I tested this tutorial, which didn't work either: http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_netbeans_6.1_for_jme_2.0



it's for an earlier version of netbeans, but it should be any difference… Anyway, there I manage to get down all the files, but when I try to create a free-form project I get an error that it already exists a project in that folder, so I open that project instead. I then run "clean and build" on it, but it doesn't compile… Am I doing something wrong? are the guides not for the newest version of jME or what?



I'm looking forward to some help with this!


it's for an earlier version of netbeans, but it should be any difference... Anyway, there I manage to get down all the files, but when I try to create a free-form project I get an error that it already exists a project in that folder, so I open that project instead. I then run "clean and build" on it, but it doesn't compile... Am I doing something wrong? are the guides not for the newest version of jME or what?

That's because this is already a Maven Project :wink:

You can open it, delete it (but not the sources!!!) and then create the Java-Free-Form project as described in the tutorial... :D

Thanks for your quick answer!



Your solution worked (almost…)



I was able to compile all the projects without errors, generate javadocs and everything. I also did all the other things in the guide, like creating the libraries and so on.



Now is the problem that it netbeans can't seam to find the lwjgl libraries. In my test project I added all the test files (like for an example "TestTerrain.java") and of course I added the necissary libraries (jME2-Compile and jME2Physics-Compile to the compile tab and the two runtime libraries to the run tab). I also added the following VM arguments:



-Djava.library.path="C:ProgramJavajME2jME2liblwjglnativewindows";"C:ProgramJavajME2jME2Physicsimplodelib"



I haven't gone through all of the examples, but it seams that the only examples that encounter problems are the one which include something directly from LWJGL, for an example "import org.lwjgl.input.Keyboard;"



Do I have to create a separate LWJGL library or some other setting? I have included the LWJGL jars in the jME2-Run library. It's all four jars: jinput.jar, lwjgl.jar, lwjgl_util.jar and lwjgl_util_applet.jar



Any tips on how to fix this problem?

Hehe,…tim8dev! Seeing this hint would have saved me 2hours that I spent trying to fix netbeans so that this repeating posts don't occur anymore. Well actually I got it somehow work out with some pom.xml-modifications but it was no fun… :smiley: Actually I don't "like" netbeans  :evil:



So you are a netbeans-user?!? It would be really really great if you could fix that wiki entry. PLEASE! :smiley:

ttrocha said:

Hehe,...tim8dev! Seeing this hint would have saved me 2hours that I spent trying to fix netbeans so that this repeating posts don't occur anymore. Well actually I got it somehow work out with some pom.xml-modifications but it was no fun.... :D Actually I don't "like" netbeans  :evil:

So you are a netbeans-user?!? It would be really really great if you could fix that wiki entry. PLEASE! :D



Did you get it to work so that you could import things directly from LWJGL?

Give me an example-class that is not working and I will test. btw: TestTerrain is working for me. What exactly is your error?

Yeah, TestTerrain.java works for me to, an example class is TestHardwareMouse.java. In the case of that class it won't compile "import org.lwjgl.input.Mouse;". Any imports directly from LWJGL won't work, everything else does.

Can you send me your pom.xml (rename it to pom.xml.txt and use the additional options here in the forum)?

where should that xml file be? I can't find it… I guess it should be in the SVN catalogue at least, and not the project file (my test project)?

Ah sry,…ok! You deleted it by the advice of tim(and used the Java-Free-Form-Project)…hmm! Actually I don't have a clue! You

added this jme-run and jme-compile lib?



For eclipse I could help you but for netbeans I have to quit here. Sry… maybe tim8dev might be able

to help you again!



Good luck (and better change the ide :wink: )



ToM

okay, thanks for trying anyway :wink:



I actually prefer eclipse too, but on this computer eclipse isn't working as it should… it has by it self defined which libraries are allowed to run in eclipse and these libraries are not included. These restrictions seams to be impossible to remove, I can only view them… All other computers I've tested on runs the same version of eclipse without problem, and this computer has almost nothing installed, so it's low probablity theres a conflict… then I tested netbeans and saw that it didn't have this restriction, so I went with netbeans :stuck_out_tongue:



Anyone knows the solution to my netbeans problem with LWJGL? (ignore my comment about eclipse)

I actually prefer eclipse too, but on this computer eclipse isn't working as it should... it has by it self defined which libraries are allowed to run in eclipse and these libraries are not included. These restrictions seams to be impossible to remove, I can only view them... All other computers I've tested on runs the same version of eclipse without problem, and this computer has almost nothing installed, so it's low probablity theres a conflict... then I tested netbeans and saw that it didn't have this restriction, so I went with netbeans Tongue


Good luck (and better change the ide Wink )


Haha.. I've started learning Java with BlueJ... :D
But BlueJ is a lern-environment not an development-environment..
Then I turned to Eclipse...
But since about 3/4 years now, I've been using Netbeans... :D
And I'm happy with it :wink:

Directly importing from LWJGL or any other lib's doesn't work with the wiki-tutorial..
But it's quite an easy workaround:

Just put the created jME2-Run into the Compile lib's and not the Runtime lib's ;)

I also started learning java with bluej :wink: and I agree, it doesn't work for larger projects :wink:



tnx, it worked!! now it's only some jmeTest related compile errors, but I don't care about them at the moment, seams like the most important things work now!



tnx everyone for the fast help :slight_smile: I was thinking of java3D first, but then I realized no one seams to use it anymore :stuck_out_tongue: This looks a lot more promising :slight_smile: reminds me a bit of slick2D!

now it's only some jmeTest related compile errors


This occurred to me too a while back when updating from svn. All the source files are there, but it seems they don't compile anymore.

I also run netbeans, but unfortunately i can't help with the setup, since i don't really remember much from setting it up. I did have some problems with the library path, but following the tutorial very closely worked, in the end.

I found the problem with the jmeTest errors, it wasn't anything wrong with the installation of jME, it was imports that for some reason was inconsistant and therefore didn't compile when I put them in my project. sometimes packages was imported from the jmetest package, sometimes from the package under jmetest, and I only included everything under the jmetest folder, not the folder itself, therefore I got compile errors.



So now everything works as it should, thank you again for your help :slight_smile: