jME Physics and Java 5

Hi potential users of the revamped jME Physics :slight_smile:

I currently consider using Java 5 language features (esp. generics and covariant return types) in the new jME Physics. I'd be interested if you have some real good reasons why not to use them.

All platforms should have a Java 5 available, the Eclipse compiler can handle the new language feature quite well now… no more reasons to hesitate?

I have mixed feelings here.  I love the features of 1.5 and use them when I can.  However, tying an API to require the 1.5 can create serious problems for people that want to release say a WebStart demo that uses physics, but this would make it so people with 1.4 can't try that demo unless they update.


is there a way to make webstart auto update your java if its not 1.5?

yes, that's the default

It won't auto-update but it can provide them the ability to update.  What about people that either don't want to upgrade or are required to use a certain version of the JRE on their systems?


This is just a question about syntax though isn't it?  Can't you use 1.5 syntax, and use compiler options to compile to a 1.4 target?  Or am I losing it here?

Not with Sun's compiler. When using a 1.5 source target, you can only create 1.5 compatible classes. However, in theory, it's possible to support many of the 1.5 features in a 1.4 class.

Yeah, I've tried that one before myself…it seems quite strange that Sun's compiler won't do that for you.


This might be of interest.

Great linkage…thanks!  :-o


How long will it be until 5 becomes usable by the main stream? 

Retroweaver works well - I already used it once. Only sad thing is that you have to ship an additional library with the retroweaved app - but as jME apps already have lots of jars an additional one does not matter.

Badmi said:

How long will it be until 5 becomes usable by the main stream?

As soon as people start to force users to install that JRE1.5 :D
MrCoder already elaborated on this and I think it is true for small games :|
If you release a full fletched game though you could afford adding JRE for some platforms - 16MB each (not 50MB MrCoder)

I'm currently creating an installation system that allows simple integration with Windows, Mac, and *nix that is defined using XML and then can be called in an ANT script.  The ANT task simply generates corresponding native executables for each OS.  These executables can package the JRE inside it or not.  The installer can be defined to be incredibly small and just find your JRE (on Windows this uses JSmooth) and if it's not the version the program you're installing wants it can download and install the JRE in your game directory for you.  This keeps the initial download small and only requires the JRE install if they don't have what your program needs.  It also provides full support for customization and OS integration (program group, desktop icons, etc.).  I'm developing this for the official release of Roll-A-Rama as it requires 1.5 and since Java applications are always so difficult for non-Java people to install, I'm trying to make this as simple as any other program to install on your machine.

I'll post something when it's ready to use.


Im not sure if this is relevent but I tried getting some friends of mine who are bigger newbs than I am to install java and what confused them was the need for activex.

…that's confusing to me too…?  Tell them to stop using Internet Explorer. :-p


:smiley: youre preaching to the converted, go linux

For internet explorer, just use a buffer overflow, and install whatever you like :wink:

Wasn't one of the goals for this revamp to decrease the dependancy of other libraries? This to make it less of a big deal to include in the jME distribution. In that case it feels like whether to go Java 5 or not is a decision on the jME level. What are the thoughts there?

Dont think its unreasonable to require java 5, in fact as soon as 6 is out and java release their "do you want to upgrade to java 6" messages like they have with 5, then all should migrate.

However, there are usually a few that havenet had time to catch up, so maybe when .10 is released, there should be one implementation which isnt forward supported by jme ( the last .09 ), and .10 itself will be 1.5 specific. It will get the frame rates up using 1.5

Microsoft have nicely primed joe public in continual upgrading, so everyone is used to it.

The performance benefits are there for the user

Mojo mentioned on his blog that the reason jme was not using 5 is that it is not supported on the mac.