Solved

Deploying JAVA 5.0, targeting 1.4 or 1.3

Posted on 2004-10-15
3
184 Views
Last Modified: 2010-03-31
Hi, as the bytecode didn't change from 1.3 to 1.5, I would assume that I could prepare some .class files
by 5 and run them somewhere on 1.3 or 1.4 (IF ONLY NOT USING API INTRUDUCED SINCE).

When I target an older version in javac I seem to produce other format of .class files? Is the above assumption wrong then?

Before you advise me so: it's no longer possible to compile those sources on 1.3 as you start to write generics.

Any experience with this kind of problems?

Note: many customers demand 1.3 because of product restrictions (BEA) or compliancy (J2EE).
;JOOP!
0
Comment
Question by:sciuriware
  • 2
3 Comments
 
LVL 92

Expert Comment

by:objects
Comment Utility
you need to use the "-target 1.3" option when compiling.
0
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
Comment Utility
> When I target an older version in javac I seem to produce other format of .class files?
> Is the above assumption wrong then?

yes, by default javac (1.5) will produce 1.4+ compatible classes
0
 
LVL 24

Author Comment

by:sciuriware
Comment Utility
:)   I add it this time myself.


;JOOP!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
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…

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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now