Fred Hamilton wrote:Seems kind of odd that the OP's friend would restricted to an older version of the JRE because of backwards compatibility problems. Is that unusual?
It is not so unusual. A lot of times code written to Java 1.4 may have specific work-arounds for bugs or behaviors in Java 1.4. Then Java 5 comes along and fixes the bug or changes the behavior and the application doesn't work the same. It is often hard to predict what the differences between versions will mean, but specifically between Java 1.4 -> 5 there was a lot of changes with the memory model. So the easiest thing to do is tell people that they only can use this one version of Java which the program was coded and verified on.
Another solution is to package a Java 6 Run Time with the application and use a batch file which launches the application with the target JRE.
I am not sure how much of the JRE install you actually have to copy. Maybe all maybe not. Your batch file / script could call something like:
Perhaps with some fooling around with the classpath if you need to add libraries etc... You could also probably have the script check the installed Java Run Time, and if it isn't 6+ then use the included one, otherwise use the built-in one.
As a note, I haven't actually ever done this myself, so it is all conjecture. But I have run applications that do this, like ImageJ for example.