JRE upgrade to 1.4.1_04
Hi,
We have a client application thats written in JAVA Swing which currently uses JRE 1.3.1. Recently the JRE version in client machines has been upgraded to 1.4.1_04.
We would like to recompile our existing application in Java 1.4.1_04. But currenly this version is not supported by Sun. Only version 1.4.2 is supported.
Could you let me know if I can complie the application in 1.4.2 and will it be backward compatible with 1.4.1_04. Or should I download the 1.4.1_04 SDK and compile my application using that.
Any suggestion would be of great help.
Thanks in advance.
Arun
[628 byte] By [
arunmah80] at [2007-9-30 4:18:28]

You do not need to recompile an an application if you want to run it on a newer JVM.
But to be on the safer side, isnt it better to recompile the application in the same environment ? Can we use the code compiled with Java 1.3.1 in JRE 1.4.1_04.Please comment..Arun
Sun always strive to make the JVM upwards compatible, which is to say you can run old software on newer JVMs but the reverse may not be true.
The exception to this rule tends to lie in the libraries where bug fixes and API enhancements may make the new API functionally different from the old one. There is no solution to this problem from a recompilation, so there is very little point in recompiling your older application.
For example, between J2SE 1.2 and J2SE 1.3 the implementation of
java.lang.Double.hashcode
Was changed. Code depending on the old functionality will not behave the same way with the new library. A recompile cannot fix this.
Worse, an attempt to "fix" your code by recompiling it may result in a failed compilation. In 1.2 there was only one Timer class javax.swing.Timer yet in 1.3 there is another java.util.Timer.
If you use the unqualified name "Timer" in your code and use the following import statements:
import java.util.*;
import javax.swing.*;
Then your code will compile in 1.2 and not compile in 1.3 - even though the compiled code will behave as expected.
Sorry if that wasn't the answer you were expecting.
Dave.
Hi Dave,
We hav no other option than to recompile the application in J2SE 1.4.1_04, so that it will be easy to make the application compatible with further upgrades ...
A few more questions here....
1. J2SDK 1.4.1_04 is not supported by Sun..and have completed the "Sun end of life process" (http://java.sun.com/j2se/1.4.1/)....What does this mean ? Will it be a problem if we use J2SE 1.4.1_04 to recompile our application. (But, we cant go for any higher versions as the client side JRE has been upgraded to 1.4.1_02 in all the machines that uses our client and would be difficult to upgrade the JRE once again)...
2.From the J2SE1.4.1_04 release notes the following bug seems to have impact on our application "When using Swing's Windows Look and Feel pressing alt may not make the mnemonics visible". One workaround for the same is provided in the release notes...Will it be Ok to go ahaed with that workaround ?
Thanks in advance for your comments...
Arun
"What does this mean ?"
It means that Sun are no longer actively maintaining the 1.4.1 series of JREs. So you won't see any bugfixes for problems with 1.4.1_04. If your organisation can afford it, you can probably purchase support for this outdated platform from Sun Professional Services.
Bugs aside, if you compile an application with 1.4.1_04 you can expect it to work on later versions of the platform (subject to the caveats I've discussed). You should be extremely wary about expecting code compiled on 1.4.2 and higher to run in your environment.
That said I doubt you'd see many problems at least until 1.5 is released (it's out in Beta now, though, so that won't be very far into the future).
I'm not familiar with the workaround you mention, but I'd expect it to work on platforms containing the bugfix as well as those not. But testing is the best way to be certain - if your clients only use 1.4.1_04 anyway, then it'll be fine.
Dave.
My old computer has 1.3.1 and I don't know how to upgrade to 1.4.1. Does 1.4.1 support XML and if it does where do I download it so I can upgrade? I play Multi User Dungeons and I own one that runs on java, but it requires 1.4.1 with XML support to run. I downloaded the developers pack but when I tried to run it it only crashed my compter. PLEASE, if anyone can help me let me know. Thank you.