Compile jme source -- Is it nesesary?

Hello, I managed to get Jme Engine up and running with help of a jmonkey user and all seem pretty smooth. Now it's about time to explore the magnificent JMonkeyEngine.  :slight_smile:



I want to start a new project of mine, so I have some questions for you (you don't have to answer all, just only what you think is important):


  1. First of all, is it necessary to compile the source library into a single Jar file? What are the correct packages to choose for the export?


  2. Can this (packing jmonkey into a JAR file) really reduce the the building time of my own project?


  3. Is it better to link the my new project with an instance of the current CVS? This is a direct relation though, the functionality of my project will be always depended on the existence of the CVS. But not really a problem, I work alone by the moment.



    Thank you for your time reading this.

    Any response is much appreciated.  :wink:
  1. It's not necessary to compile the source at all, if you get the nightly builds or the latest release you should be fine.  Just link the jar files from those releases into your project.

        If you want to build JME you can use the ant task associated with the build.  I only build once a day, IF I've resyncd with the CVS tree.  Otherwise I don't build at all.  I would only build JME once after a resync with CVS IF you have resyncd… otherwise the existing jars associated with your project should be sufficient.
  2. JME jar'd is standard.  You need only to create your new project and associate the JME jars with it as part of your classpath… Your project should be separate and independent of the JME directories.
  3. It's really up to you.  I don't link my projects with any instance of JME CVS just the jars from the project.  My projects are all in their own CVS and I update the CVS trees when I need to.



    I know some that use Eclipse have their projects setup to check the JME CVS and compile when there's a change.  I don't use Eclipse so I can't speak for them.



    In IntelliJ, I have a project that contains JME, one for BUI, and other projects for various other libraries I use.  I resync the CVS trees once a day and build the jars for those external libraries.  In MY projects my ant tasks go and get the latest jars from the other project folders and put them where they need to go.  I resync my CVS many many times a day for my project, but not JME nor any of the other external libraries… unless I read a post that a major fix or change has been checked in… then I might resync.

Thanks!  :smiley:



I found some info here on how to do the jme build.

http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_eclipse_to_build_jme#the_visual_guide



Although when I try it I get the following error…



Buildfile: C:Documents and SettingsUser1workspacejmebuild.xml
Overriding previous definition of reference to classpath
init:
    [echo] jmeKeyStore
compile:
    [javac] Compiling 1505 source files to C:Documents and SettingsUser1workspacejmebuild


BUILD FAILED
C:Documents and SettingsUser1workspacejmebuild.xml:53: Error running javac.exe compiler


Total time: 1 second

What does it mean?

Ant couln't find your JDK, namely the java compiler. Check if the PATH environment variable of your Windows OS contains the path to the bin folder of your JDK installation.

ANT file:

<javac source="1.5" target="1.5"

      srcdir="${src}/jmetest"

          destdir="${class}"

    />



It compiles with jdk 1.5 - You may want to switch workspace jre to 1.5 or try edit ant build file to compile with 1.6 (I haven't ever tried yet)

By default Eclipse uses the JRE as it comes with its own compiler.  The ant build script however can not use Eclipses compiler and thus needs a JDK.  If you tell Eclipse to use a JDK instead of a JRE ant will work correctly.



Also you don't need to update the ant file to build under 1.6 as the source and target are backward compatible.