ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@apache.org>
Subject Re: Using JDKs with jar files
Date Mon, 16 Apr 2001 15:29:54 GMT
----- Original Message -----
From: "Shannon Wagner" <swagner@smartmoney.com>
To: <ant-user@jakarta.apache.org>
Sent: Monday, April 16, 2001 4:02 PM
Subject: RE: Using JDKs with jar files


> Isn't it possible to use the "target" attribute of the <javac> task to
> accomplish this?
>

All the following is based on the documentation from jdk1.3

Not with the target attribute alone - see the Docs for JDK 1.3:

--- cut ---
Cross-Compilation Options
By default, classes are compiled against the bootstrap and extension classes
of the JDK 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 both 1.1 VMs and
VMs of the Java 2 SDK. The versions supported by javac in the Java 2 SDK
are:

1.1
Ensure that generated class files will be compatible with 1.1 and VMs in the
Java 2 SDK. This is the default.
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.
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.

-bootclasspath bootclasspath
Cross-compile against the specified set of boot classes. As with the user
class path, boot class path entries are separated by semicolons (;) and can
be directories, JAR archives, or ZIP archives.

-extdirs directories
Cross-compile against the specified extension directories. Directories is a
semicolon-separated list of directories. Each JAR archive in the specified
directories is searched for class files.
--- cut ---

so bootclasspath and extdirs must also be specified.

Nico



Mime
View raw message