Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mixing *.class* files compiled for various JVM?

Status
Not open for further replies.

alebu

Programmer
Sep 7, 2002
46
How compotible are *.class* files from various JVM?
For example: Can I use classes compiled using JDK 1.3
with classes form JDK 1.4? How JVM reacts in such cases?
Opinions? Links?
 
1.3 /1.4 *generally* work - as long as you are not using anything introduced specifically in 1.4, or anything that has dependencies on anything introduced in 1.4.

Trying to make 1.4 compiled classes work on 1.1/1.2 *generally* won't work with anything but the most simplest of programs.

I would never advise compiling and running on different JVMs/SDKs however, as the results could be unexpected.
 
Well, the case is that I have some third parties precompiled *.jar files ( jdbc, for example ) and I don't know, which jdk they used to build them. Theree is also Sybase EAServer with its own jdk, and finally: my own code :) . It seems that its works but sometimes strange errors happens, so 'class-mix' is only one of possible reasons...
 
what do you mean precompiled? In java does not exist such concepts as precompiled.

Ion Filipski
1c.bmp
 
IonFilipski :

Don't be so pedantic - its obvious he means compiled !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top