?
Solved

Java JRE and backwards compatibility

Posted on 2004-03-31
6
Medium Priority
?
608 Views
Last Modified: 2013-11-23
I have been keeping my SDK fairly current on Linux (Sun 1.4.2_03) and the java application being developed is working fine. I know that the SDK comes complete with a jre that can be included if I install the application on other Linux computers.

My question is generic in that if I move my application, being developed with 1.4.2_03,  to other Linux computers that have some other version of the jre (1.3.1 from blackdown.org or Sun for example), should I have a lot to worry about?
0
Comment
Question by:jdwarren
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10726138
Depends on whether you've used 1.4 specific classes. If you haven't, and recompile with

javac -target 1.3 YourApp.java

you should be OK
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 10726238
>> javac -target 1.3 YourApp.java
You don't have to specify the -target option as the default for JDK 1.4 is 1.3 (sic).
0
 

Author Comment

by:jdwarren
ID: 10727357
orangehead911,
If the -target option is already defaulted to 1.3 does that mean that 1.3 and 1.4 basically are the same for javac and therefore there is not much to worry about?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Accepted Solution

by:
CEHJ earned 200 total points
ID: 10727444
>>You don't have to specify the -target option as the default for JDK 1.4 is 1.3 (sic).

Won't do any harm. Not the case with some compilers. If i compile with jikes against 1.4 libs without -target 1.3 it trashes 1.3 appletviewer
0
 
LVL 24

Assisted Solution

by:sciuriware
sciuriware earned 300 total points
ID: 10729593
Please distinguish between compiler and virtual machine (JRE):
1.4 added not too much to the notion of the .class files, only some optimisations and a smarter JRE for
higher speed. On the contrary 1.4 added a lot of new classes and techniques you're gonna miss on a 1.3
system.

Be aware that 1.5 will not be compatible on the compiler level: new language elements are added.

When you deliver an application, always add the current JRE and leave it to the customer to
install it or ask for a scaled-down version of the application.

;JOOP!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10733452
8-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question