Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Java JRE and backwards compatibility

Posted on 2004-03-31
6
Medium Priority
?
617 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

618 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