Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running Java 1.4 compiled code using 1.5 JVM

 
Michael Mathewson
Greenhorn
Posts: 7
Eclipse IDE Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any known repercussions to running Java 1.4 compiled apps under a 1.5 JVM (altering the JNLP to use 1.5)? We have run into an issue with clients running our 1.4 apps while using Windows 7 64 bit machines, the issue being it doesn't work. It does work with Java 5 32-bit JRE installed on the Windows 7 machine. Any thoughts would be greatly appreciated.

Thanks,
Michael
 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe there are some JVM incompatibility with anothers architectures like from 32bits for 64bits, i don't know. But you could try search for flag configs to JVM to run it as 1.4 java code and maybe some flag to convert 32-64bits or something like that.
 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to this discussion on StackOverFlow: http://stackoverflow.com/questions/783662/java-32-bit-vs-64-bit-compatibility there is no such thing as incompatibility between .class/source in 32bits and 64bits, but there is certainly while running code on different versions.

Even so, i don't believe it could not work once "Write once, run everywhere" is what mess/bless us, what happens when you try to run the program? Try to execute this from the DOS and see what is returned, like an error or something like that!
 
Rob Spoor
Sheriff
Pie
Posts: 20550
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Mathewson wrote:the issue being it doesn't work.

ItDoesntWorkIsUseless. What error are you getting, or what is it doing other than expected?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15359
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to run Java 1.4 compiled apps on Java 5 without changing anything. Sun (and now Oracle) have always been very, very careful to make sure that newer Java versions are backwards compatible with older versions.

However, there are a number of possible situations where you will have to change something in your code. The following document describes these in detail: Incompatibilities in J2SE 5.0 (since 1.4.2)
 
Sunny Bhandari
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many times I have faced the issue of version of a particular API class being not what is supposed to be when running programs on newer JDK
 
Michael Mathewson
Greenhorn
Posts: 7
Eclipse IDE Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the responses guys... the thing to mention i guess is the highest public version of Java 1.4.2 is Update 19, and this is not supported under Windows 7... not till Update 23 and that gets you into Java For Business which isn't free and is very costly... hence attempting to run our 1.4 apps under the 1.5 JVM.

http://www.oracle.com/technetwork/java/javase/system-configurations-139862.html

Under Update Release Footnotes see ...

Windows 7 support was introduced in 1.4.2_23.


Rob Spoor said "ItDoesntWorkIsUseless. What error are you getting, or what is it doing other than expected?" >>> i mean it does not work, nothing happens... this was with trying 1.4.2_19

On another note, we have been testing one of our simpler applications (reporting) and everything seems to be working as normal... the next will be our billing app which has more depth to it... my main concern was if anyone knew of any specific things that would not work by running this way.

Once again, thanks for everyone's time... much appreciated.


Michael
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15359
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you decide to upgrade to a newer version of Java, then I'd strongly recommend that you use Java 6, not Java 5 - because Java 5 is also very old and has been in the end-of-life status since October 2009 (see this page for more information).

Java 6 contains lots of improvements, not only in functionality but also in performance, compared to Java 5.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic