New Applet and Desktop deployment options in jMonkeyPlatform


jMonkeyPlatform now has easy to use build extensions to create executables for most platforms:

When building the project, for windows an exe file will be created that can be used instead of the main jar file. So for your windows users you just distribute the exe and the lib folder. For MacOSX an application is created that contains all data, it is created as a zip file in the dist folder to preserve the needed file attributes on Windows systems. For Linux I am still evaluating whats the best way to do this, probably a simple shell script will do.

Furthermore, theres now automatic creation of proper lwjgl applets:

The applet will be created in an Applet folder upon build, upload the complete folder to your website and open the run-applet.html

You can get the two new plugins via Tools->Plugins->“Available Plugins”, enable the nightly update center under “Settings”.




oh, looks awesome, got any examples online of what the applets produced look like?

Heres the example:

This is great!!

I thumb you up to 60 Normen!!!

I made the applet thingy :smiley:

But normen made the framework that allowed those kinds of magical things to happen :stuck_out_tongue:

Is there any features you might want for the applet thing? Its really so easy already I dunno what else to add. You just click a check box in jMP and bam you get an applet folder which you upload to your webserver and it “just works”.

1 Like

The monkey logo and light blue progress bar don’t fit/look nice enough atm, so some improvements there could be done :slight_smile:

Really nice that your using the pack200/lzma stuff, should really cut down the size.

Consider using LWJGL’s Display.initalBackground(r,g,b) api, this was added specially for applets to get a nice seamless switch from the appletloader to the lwjgl applet, so if your defaulting to a white background for the appletloader you should set the initial color of Display to white, Display.initialBackground(1f, 1f, 1f); which is called before Display.create(), should make the switch much nicer.

Many cards out there don’t support OpenGL 2.0 yet, so its not very nice for those users, it just silently crashes for them with an exception on the java console. You should catch this exception and then just show a message explaining this to them (can be done with java2d).

Other then that pretty awesome work.

A feature much appreciated! Making lwjgl applets can be such a mess sometimes.

I tried to apply this to my existing project. It seems to build alright, but it doesn’t copy the libraries into the /lib folder (in fact it complains that there is no /lib folder until i create it manually). Also the code.jar only contains project class files.

I’ve created a testproject to see if there’s any difference in the project properties but wasn’t able to find anything. What am i missing?


It will only create the lib folder when you have only jar files as libraries in your project. When you add folders to your projects libraries they will not be copied anymore. Only exception is the assets folder, which is replaced with the assets.jar on build.

Ok. It turned out i had a few “Projects” as libraries. Fixed.

I’m running into a security exception now instead:

This occurred while 'Switching applet'
Invalid signature file digest for Manifest main attributes
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at Source)
at Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)

My applet doesn't do anything that requires a certificate. I know you can run into problems if you have multiple certificates, but afaik lwjgl is the only one in my project. Is there a way to find out what is causing the problem?

On a side note:
There is an applet test among the jme3 tests. Is that obsolete now with this (much cleaner) method?

The META-INF folder in code.jar included the certificate files from oddlabs. I thought they were supposed to be there, but when comparing to a “clean” jar, they weren’t. Removing them solved the problem.

rickard said:
There is an applet test among the jme3 tests. Is that obsolete now with this (much cleaner) method?


Sweet is all I’ll say! :smiley:

The code.jar shouldn’t have the certificate files. The lwjgl jar is explicitly excluded so the only way this could happen is if some other jars from LWJGL are put into the classpath.

You know, great things like this really make me wonder how people can under-estimate the power of java in this day and age, and in the future with the advancement of the speed of computers, the increasingly irrelevant speed difference between C++ and Java is becoming a null argument.

The biggest reason to pick Java over C++, at least for my self, is the speed and ease of development. I mean, look at those features and painless product deployment. It really is awe inspiring.

Great work guys!


Oh and also, I am trying to find this Plugin, but the problem is I don’t quite know what it is called… :stuck_out_tongue:


Oh and also, I am trying to find this Plugin, but the problem is I don’t quite know what it is called… :P

Go to "Plugins", "Available Plugins", scroll down to "jMonkeyPlatform". This one is called "Desktop Executables Support"