Deploy JME3 application

Ok I have come to a point where I would like to deploy my app.

The problem is that I don’t really know how to do it. Deployment options in JMP doesn’t really work, I get errors that some “lib” directory is missing for all 3 OS. Also, how can I exclude from jme3 the things that I don’t need in my project (for example tests and test data and probably some other stuff)? Ty.

You seem to have not only jars in the “library” section of your project, thus you get a warning that the libraries are not copied, thus the libraries cannot be used for the distribution formats. Its all in the log really :wink:

Hmm. I don’t really have anything else in my “libraries” section under project properties, except for another jar from my data project.

This is the error I get when building (I tried making this folder by hand, but it gets deleted when building for the second time):

Windows EXE Creation

Compiling resources



Successfully created D:MyProjectM-EditordistM-Editor.exe

D:MyProjectM-Editornbprojectlaunch4j-impl.xml:13: D:MyProjectM-Editordistlib does not exist.

BUILD FAILED (total time: 9 seconds)

The error that states that your libraries cannot be copied is earlier in the log.


I checked and I get this:

Building jar: D:MyProjectjme3distjMonkeyEngine3.jar

Copy libraries to D:MyProjectjme3distlib.

To run this application from the command line without Ant, try:

java -jar “D:MyProjectjme3distjMonkeyEngine3.jar”

So I assume that libraries are correctly copied. But it bothers me, that it copies them to jme3 folder and not in my project folder…

Uh… I have no idea how that can happen… Did you rename the project folder with your systems file explorer? You should only rename the project via jMP…

I didn’t rename anything. I imported all projects from Eclipse and did directly that, no other stuff… :slight_smile:

Well something is not right in the project setup, the default project uses the name of the folder you specify. Anyway try renaming the project folder to jme3 and then open the project again, then rename it with jMP to change the folder name back.

Project folder name is “jme3”, but it was shown as “jMonkeyEngine3” project in jMP. Anyway, I renamed it in jMP to “jme3”. It still doesn’t work. Anyone else has the same experience with this?

I dont understand what you are saying but anyway

Copy libraries to D:/MyProject/jme3/dist/lib.

Successfully created D:/MyProject/M-Editor/dist/M-Editor.exe

dont fit together. Why is there a project folder named jme3 and one named M-Editor? And why do the two mix up? Theres got to be a reason for that.

Yes, I should probably explain more.

Ok I am using Eclipse for my coding. But since deployment can be pain in the ass, I figured out that I could use jMP for that job. So I started jMP and imported 3 Eclipse projects to it (they are: jme3, M-Data, M-Editor; M-Editor depends on M-Data, which depends on jme3 - this is project setup in Eclipse). I want to pack everything in one cool jar or smth and make executables for different operating systems. And I am obviously not really successful with that… :slight_smile:

actually in eclipse, run the build.xml script with the ant builder (open and click run while cursor is in the script)

then export your project to a jar

now copy the jar + the needed jars from the jme dist folder toghether, use a script to start the java runtime and include all jars to the classpath

This one works for windows, of course you need to replace the classname with the one where your main is.

@echo on

FOR /R ./ %%a in (*.jar) DO CALL :AddToPath %%a


java online.newhorizons.client.ClientApplication





Oh, so you used the import function for Eclipse projects? Very interesting, I didnt have time to play with that. Could you send me the project folder and exactly describe how you imported it and wha options if any you chose while doing that? You can exclude the contents of the source and/or assets folder if you want.

Jeah, thanks for your suggestion EmpirePhoenix, but I just want my IDE to do this automatically for me. :smiley:

Ok, let me put it to a simple steps, because I think its a little overhead sending everything and stuff…

I made it the same way as its written:

Eclipse part:

  • Use subversion or just import jme3 project, so you can browse its code and run tests

  • Make new project, lets call it "Test", and copy paste some test class from jme3 project (I used

  • There should be errors, because there is no jme3 in classpath

  • Right click on "Test" project, click Properties, click Java Build Path, choose Projects tab, and Add jme3 project

jMP part:

  • Click File->Import Project->Eclipse Project...

  • Choose your eclipse workspace location and on the next dialog screen, choose Test and jme3 project to import

  • There should be some warning that there is already netbeans data for jme3 project and it will be used instead, its ok

  • When both projects are imported, there should be errors in Test project, so right click on it, click Properties, click Libraries and under Compile tab, Add project - jme3; it will probably add jMonkeyEngine3.jar from dist folder; also under Application -> Desktop, select that you want .exe or whatever :)

  • Last step: right click on Test project and click on "Clean and Build"

  • Watch the log :)

Hopefully it helps?

Well in eclipse the answer is a own ant buildscript, it can does all the deployment work automated, once configured correctly. (I wrote one for the nh client, deplaying a new client is onyl one click and 2 minutes now, it buidls all stuffs, gerenates the updater info files ect, was some hours work but now its quite good and I’m saving a few minutes fo manually copying the stuff each time I run it)

Okay, so I thnk the compile error is because you added the whole jme3 project instead of just the jar files to the project.

Also if I add only jar file or jme3 as library, it isn’t any better… :slight_smile:

Well, you would have to import it again… Really, its all about the project imports here… Try creating a new blank BasicGame project and look if your project settings resemble that.

Ok, after many time and testing I still didn’t succeed.

I imported simple project from Eclipse and made new project in JMP like you suggested. I copied every setting by hand from JMP project to Eclipse project. Still the same error… JMP project builds ok, but Eclipse project still has this error:

Building jar: D:MyProjectTestisdistTestis.jar

Windows EXE Creation

Compiling resources



Successfully created D:MyProjectTestisdistTestis.exe

D:MyProjectTestisnbprojectlaunch4j-impl.xml:13: D:MyProjectTestisdistlib does not exist.

BUILD FAILED (total time: 0 seconds)

Any idea please? :slight_smile:

Windows EXE Creation

Compiling resources



This is not the standart eclipse java-build you are doing there…