JDK-4515858 : cannot prepend bootclasspath in javac
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.4.0,1.4.1
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_8
  • CPU: generic,sparc
  • Submitted: 2001-10-17
  • Updated: 2003-04-12
  • Resolved: 2002-09-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Description

Name: bsT130419			Date: 10/17/2001


java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)

In short: javac lacks the option -Xbootclasspath/p:

Our problem:

We are replacing some of the Java core by prepending a .jar file to
the bootclasspath:

java -Xbootclasspath/p:ourstuff.jar

javac does not have an -Xbootclasspath/p: option, the compiler exits with
an error message:

> javac -Xbootclasspath/p:ourstuff.jar
javac: invalid flag: -Xbootclasspath/p:ourstuff.jar

There is an option -bootclasspath in javac. This option is used to set
the *whole* bootclasspath.

  Touble is, in our case, we want to keep most of the vanilla bootclasspath
--  the bootclasspath that javac uses when called *without* the
-bootclasspath option set). As for now, we have to keep track of the
standard bootclasspath and add it "manually" to the option -bootclasspath,
after ourstuff.jar
(Review ID: 133927) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis mantis-b02 FIXED IN: mantis mantis-b02 INTEGRATED IN: mantis mantis-b02
14-06-2004

WORK AROUND Name: bsT130419 Date: 10/17/2001 Use System.getProperty("sun.boot.class.path") (see code below) to find the bootclasspath in use, then use the -bootclasspath option when calling javac. public class Bootclasspath { public static void main(String[] args) { System.out.println(System.getProperty("sun.boot.class.path")); } } ======================================================================
11-06-2004

PUBLIC COMMENTS javac now recognizes -Xbootclasspath/p:<em>path</em> where <em>path</em> is a path. javac prepends the given path to its default bootstrap classpath.
10-06-2004

EVALUATION Yes, a good idea. ###@###.### 2001-11-12
12-11-2001