wood burning stoves 2.0*
The moose likes Java in General and the fly likes Java 5 as jre1.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java 5 as jre1.3" Watch "Java 5 as jre1.3" New topic
Author

Java 5 as jre1.3

Swapnil Shroff
Ranch Hand

Joined: Mar 07, 2006
Posts: 58
How can i run a program on Java 5 jvm but as 1.3


SCJP 5, SCDJWS<br /> <br />It's amazing how premature optimisation is both seductive and destructive; even when you know
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3432
    
  12
If your program was compiled using JDK 1.3 then it should run on a 1.5 JVM. Are you having a problem or is that not what you were asking ?


Joanne
Balasubramanian Chandrasekaran
Ranch Hand

Joined: Nov 28, 2007
Posts: 215

Originally posted by Swapnil Shroff:
How can i run a program on Java 5 jvm but as 1.3


I guess you are asking about running your class file under the JVM which you specify. If this is what you want then you can use


[ April 08, 2008: Message edited by: Balasubramanian Chandrasekaran ]
Swapnil Shroff
Ranch Hand

Joined: Mar 07, 2006
Posts: 58
yes bala. I want to use java -version:<version-number>
however does the jvm require the target versioned VM also
Swapnil Shroff
Ranch Hand

Joined: Mar 07, 2006
Posts: 58
Also, what does the -version:<> does.
Does it run current jre as target version
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41183
    
  45
The "-version" option simply causes the JRE version to be printed; it does not cause any change in the way the JRE works.

It's not clear to me what you mean by "run as 1.3". As Joanne said, JREs are backwards-compatible: anything that ran on 1.3 should also run on 5. As far as I know, there's no way to get a newer JRE to behave like an older one. Why would you want that?
[ April 10, 2008: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Swapnil Shroff
Ranch Hand

Joined: Mar 07, 2006
Posts: 58
The "-version" option simply causes the JRE version to be printed; it does not cause any change in the way the JRE works.


I think -version option does more than that
From java command


JREs are backwards-compatible: anything that ran on 1.3 should also run on 5.


JRE 5 does not have assured compatibility with 1.3. I tried my code(its a legacy code with heavy swing/awt use) compiled on 1.3.1_19 to run on 1.5 but it gives me wired exceptions.

-version option gives a way to run code compiled with olderversion to run on latest version. I tried doing it eclipse and was successful . however I want to so similar thing on command prompt.

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41183
    
  45
JRE 5 does not have assured compatibility with 1.3. I tried my code(its a legacy code with heavy swing/awt use) compiled on 1.3.1_19 to run on 1.5 but it gives me wired exceptions.

Interesting. What kind of exceptions? I suppose it's possible that the code used to work because of a bug on 1.3 that has since been fixed, or that there's a new bug in Java 5 that keeps correct code from running.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java 5 as jre1.3
 
Similar Threads
heap size
Vote here: I'm studying for the SCJP 1.5 exam
Strange Behaviour -- Pls Advice
Show me the Path...
java 1.4 or 5.0