Solved

Java JRE and backwards compatibility

Posted on 2004-03-31
6
563 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
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 86

Accepted Solution

by:
CEHJ earned 50 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 75 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

758 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now