JDK-4757441 : RFE: Add an option to javac to specify endorsed directories
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2002-10-03
  • Updated: 2003-01-31
  • Resolved: 2003-01-31
Related Reports
Duplicate :  
Relates :  
Description

Name: gm110360			Date: 10/03/2002


FULL PRODUCT VERSION :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)


FULL OPERATING SYSTEM VERSION :
SunOS mars 5.8 Generic_108528-16 sun4u sparc
SUNW,Ultra-Enterprise


A DESCRIPTION OF THE PROBLEM :
When using javac to compile java files against endorsed
libraries, the endorsed directories flags can only be
specified via the JVM. ie.

> javac -J-Djava.endorsed.dirs=$(JAVA_ENDORSED_DIRS) etc...

In the same way that extensions and bootclasspath can be
overridden directly to javac, an option should be added to
javac to allow endorsed to be specified directly to the
compiler.

This would allow scenarios where the JVM that executes javac
requires standard libraries, but the classes being compiled
require different endorsed libraries.

eg.
This could occur when using jakarta-ant for builds where an
an ant-XML task requires standard jdk versions of
org.xml.sax, but the ant-javac task is compiling java files
that use a newer sax version.

It is possible to achieve a similar result with javac using
-bootclasspath, but this seems to run contrary to the
endorsed standards mechanism, and requires specification of
every jar file instead of just the endorsed directory.


REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 165283) 
======================================================================

Comments
PUBLIC COMMENTS ...
10-06-2004

EVALUATION The new facility to javac to prepend to the bootstrap classpath can be used for this purpose. ###@###.### 2002-10-04 On second thought, perhaps it is only an awkward workaround. ###@###.### 2002-10-04 Doesn't the existing -extdirs flag address this need? ###@###.### 2003-01-31
04-10-2002