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
Solved

Java JRE and backwards compatibility

Posted on 2004-03-31
6
582 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet doXXX methods 3 62
configure dependency in POM for new database 3 34
servlet web applications   metadata-complete="true" or false 3 109
hashmap order 17 36
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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

839 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