I just installed jME from CVS following the Eclipse tutorial and somehow I ended up with 5,551 errors! The first 100 complain about not being able to resolve what appears to be everything. I’m using the latest JDK for Ubuntu AMD64, my OS.
Can anyone help? I’d love to try jME, if I can pick it up I may be able to integrate it into an independent study next year. Thanks in advance,
Hey javagamer, most likely you haven’t added the libraries to your path.
Is this the tutorial you used? http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_eclipse_to_build_jme
Step 10 tells you how to add the libraries. Those instructions have worked for me many times over now, including on an AMD64 Ubuntu machine.
If you are looking for a really good introduction to coding with JME, check out the Flag Rush tutorials:
Hmm… that does look like its set up correctly. I'm going to admit that I'm not sure what the problem is.
One thing that occasionally happens to me when I checkout a repository in Eclipse is that, for whatever reason, it refuses to build the classes to the default build directory ("bin").
I've never been sure why that happens, but its always been fixed for me by going to jme->properties->java_build_path->source, then at the bottom of the page where it says "default output folder" followed by "bin", hit browse. A dialog will pop up; create a new folder ("bin 2"), and hit ok. It will ask you if you want to get rid of the old binary folder and switch to the new one; do so.
I just tried switching to bin2, but I still get 5,551 errors. Could it be related to my version of java? If I type java -version I get:
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
Please help :(
Ha, ok I'm pretty sure your problem is that you are running off the JRE, not the Java JDK.
Get the Java Development Kit here:
And switch to using it (in Eclipse): Window->Preferences->Java->Installed JREs
I used Synaptic to install Java and I got both the JRE and JDK, I wasn't sure if the JDK needed the JRE. I was afraid this might be the problem, I only see JRE in the Installed JREs so I'm going to uninstall it and reinstall the JDK. Hope it works.
It turns out I can't install the JDK w/o the JRE. Anyhow, I reinstalled them both and I still get the errors. I had Eclipse search /usr for JREs and it found the Sun's as well as OpenJDK. I have a feeling the problem is with something else since I get the same errors when I switch to OpenJDK (it does recompile though). Can anyone think of what else it could be?
Compliance level sets the version of java that the code compiles against. Version 6 (or 1.6) and 1.5 have a number of new features added to the language that previous versions of java didn't understand. If you set the compliance level lower, than if it encounters any newer things (such as enums), the compiler won't know what to do with them and your code won't compile.
Looks like I solved it!
I didn't see the step about setting the compiler to the highest compliance level, I can run the Teapot example fine.
BTW, what does compliance level do?