[jdom-interest] JDOM Beta 9 RC 2

Steve C scondas at yahoo.com
Wed Apr 23 08:46:20 PDT 2003


The 1.4 compiler (javac) targets the 1.2 jvm by default.  The following is from the 1.4.2 JDK: Cross-Compilation Options
By default, classes are compiled against the bootstrap and extension classes of the platform that javac shipped with. But javac also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use -bootclasspath and -extdirs when cross-compiling; see Cross-Compilation Example below. 

-target version 
   Generate class files that will work on VMs with the specified version. The default is to generate class files to be compatible with the 1.2 VM in the Java 2 SDK, with one exception. When the -source 1.4 option is used, the default target is 1.4. The versions supported by javac are: 

1.1 
   Ensure that generated class files will be compatible with 1.1 and VMs in the Java 2 SDK. 
1.2 
   Generate class files that will run on VMs in the Java 2 SDK, v 1.2 and later, but will not run on 1.1 VMs. This is the default. 
1.3 
   Generate class files that will run on VMs in the Java 2 SDK, v 1.3 and later, but will not run on 1.1 or 1.2 VMs. 
1.4 
   Generate class files that are compatible only with 1.4 VMs. 


Steve 


Stephan Trebels <stephan at ncube.de> wrote:My understanding is different: 

The JDK 1.4 class file format will not by default be used by javac
(1.4.1). The default - as always - is to generate class files
compatible to the last major rev, so it's 1.3 class files. By default
not even aserts will be recognized.

Stephan


On Wed, 2003-04-23 at 16:54, Gordon Tyler wrote:
> John L. Webber - Jentro AG wrote:
> > As far as the source code is concerned it probably doesn't matter, but 
> > anyone using the pre-built jars with a pre-1.4 VM will likely see an 
> > exception like this:
> > java.lang.UnsupportedClassVersionError: Test (Unsupported major.minor 
> > version 48.0)
> > 
> > I'm not sure if this will happen with an external library compiled under 
> > 1.4 but run pre-1.4. Does anyone have time to test that -- I have 
> > meetings this morning... ;-(
> 
> JDK 1.4 introduced some changes in the class file format, upping the 
> class version, hence the exception. Pre-1.4 JVMs will not be able to use 
> classes compiled by the 1.4 compiler at all.
> 
> Ciao,
> Gordon
-- 
Stephan Trebels Consultant
company: nCUBE Deutschland GmbH, Hanauer Str. 56, 80992 Munich, Germany
phone: cell:+49 172 8433111 office:+49 89 1498930 fax:+49 89 14989350


_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030423/16b7f979/attachment.htm


More information about the jdom-interest mailing list