jME and Eclipse: A Starter Guide - v1.1.1

Hello all !



I am a beginner, sorry bothering you with noob question but i have tried to use cvs with eclipse 2.1.2 and when i build the project i got this message :


uildfile: C:javaeclipseworkspacejmebuild.xml

init:

compile:
[javac] Compiling 274 source files to C:javaeclipseworkspacejmebuild
[javac] BUILD FAILED: file:C:/java/eclipse/workspace/jme/build.xml:29: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
Total time: 437 milliseconds


Another thing, i have not found "jl030.jar" in the lib dir.

Thank you, sorry for my english, i am french :)

PS : I have worked with 0.5 jME and it works fine ! it is a great job ! may be i will write some french tutorial when i will be better using jME :)

just to mention …



jme does well in NetBeans also.



with 3.5.1 just mount with internal CVS client and check it out.

ANT build files are recognized and you can build out of stand.



NB 3.6 on the other hand seem to have a serious CVS problem at the time. (will check again after some time)



Martin

Sifilys: I’ve never been able to get ant to work with eclipse pre-3.0. I would recommend upgrading (if you can) to the newest Eclipse. I’m using 3.0M8, which you will see is very different than what you are used to, but things have greatly improved.



If you can’t upgrade for some reason, try running ant in the command line window.

With eclipse 3.0M8, it works fine ! thank you !



But i have used run>external tools>run as… to build all.





Thank you.

Ant works for me under Eclipse 2.1.



It’s been awhile since I installed Eclipse, and I remember that there were some issues, but they were all solvable.



If needed, I can help figure out 2.1 ant issues.



-Mike

No thank you Mike, within this summer Eclispe 3 will be released with a french language pack :slight_smile:

Not quite eclipse relatet :slight_smile: but



I tested jME with NetBeans 3.6 on linux recently -> works great



Heres the short version of what i did:



Create a new project in netbeans

mount jme as CVS - System managed Folder (fill in the server-data)



do a checkout



make sure to do subsequent update’s with -d -p switches



right-click the build.xml for jme or jmetest -> RunTarget -> dist



for testing / running the tests:

make a symlink from somewhere in the java.library.path

(sdk/jre/lib/i386 for me) to jme/lib/liblwjgl.so and jme/lib/libopenal.so

(there could be a cleaner way of doing this ??)



mount root for jmetest - output (.class) to add its classpath



mount jme/lib/lwjgl.jar and jme/target/jme.jar (classpath)



right click on one of the test - classes -> execute to start execution



remark:

as i’m no jme - developer i never tried to check in someting but checkout and update work great.



regards

Marin

Any chance of an update? I’m using Eclipse 3.0.2 and after following the part about the “nature” tag the explorer view looks totally different (I was just beginning to find my way around!). I abandoned the guide at that point. I guess all the grey icons refer to empty directories I’ve seen mentioned in other posts?



Maybe someone could also advise on the following. Excuse any dumb questions and please be detailed in any answers…


  1. I figure I need to create a “run configuration” if I want to run one of the test/tutorial examples that I’m currently viewing in Eclipse, correct? My attempts so far result in “NoClassDefFoundError”. NB I have already built jme from the command line and ran several tests but I’d like to launch from Eclipse while I study the code (prob in debug mode as well)


  2. How do I go about creating my own copy of the test src so I can modify while keeping the originals. I suspect just create new project and actually copy src files but do I need to define my own package?


  3. I created a new project to help find my way around Eclipse and noticed jme already included in the list of libraries. No surprise there because I had already built it and placed the jars etc in ~/Library/Java/Extensions, one of the few places Mac Java looks for default libraries. Now, what to do if I always want to use the latest build without manually copying files over to the Extensions dir?



    Thanks for any/all help.

Hi! Yeah, my poor guide is quite outdated at this point. I’m not surprised at all you had problems following it. So, I’m gonna rewrite the guide in the next few days. I’ll give it a go if I have some spare time at work tomorrow, heh.



As for creating a copy of the test sources, I’d advise going to wherever you’ve put jME and simply copying the src/jmetest dir to somwhere else, like the root jME directory. Not a particularly elegant solution, but it’s simple and gets the job done. :slight_smile:



For your third question, do you mean using the latest CVS build of jME in another Eclipse project? If so, that’s reasonably simple:

  1. Go to Project -> Properties
  2. Select the Java Build Path entry on the left
  3. Go to the Projects tab
  4. Click on Add...
  5. Select jME in the list and click Okay
    [/list:o]
    That should set things up properly. If all goes well, that'll also link in the Javadocs included in the source files.

    Hope that helps!

Hi,

I am new to the jMonkey Engine (and am a relatively new Java programer). I have gone through the process described here: http://www.jmonkeyengine.com/index.php?option=com_content&task=view&id=24&Itemid=47



I got everything to work just fine and have run the tests. Now, I’m trying to learn Eclipse, but I have run into problems.



I’m using Eclipse 3.0.0 on Windows XP. Checking out jme from CVS in Eclipse works fine. However, when I look at the project in the Package Explorer it is riddled with errors. So, I did the following steps:



From the project -> Properties -> Java Build Path -> Libraries tab.

I included the following jars: target/jme.jar, /lib/jogg-0.0.5.jar, /lib/jorbis.0.0.12.jar, lib/lwjgl_fmod3.jar, /lib/lwjgl.jar.



After I hit okay, it rebuilds (at least, that’s what I think it’s doing), but the errors don’t go away.



I realize that from the command line build instructions, that I’m leaving out an action that corresponds to the element: -Djava.library.path=./lib

I’ve learned that -D is used for setting a system property, and Eclispe Help has pointed me to



Window -> Preferences -> Workbench -> Linked Resources



but I have no idea what to enter here (or even if I’m on the right trail).



What is this missing piece of information that is causing the errors and how do I communicate it to Eclipse? Are there other errors that I’m making?



Thank you in advance.

Take a look at Window->Preferences->Java->Installed JREs->Select from list->Edit->Default VM Arguments



That’s where I put my -Djava.library.path=./lib