JDK-4663688 : javac should support JAR dependencies
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-04-05
  • Updated: 2002-12-16
  • Resolved: 2002-04-05
Related Reports
Duplicate :  
Description
In working with the Web Services Developer Pack I was very
frustrated over the number of JAR files and the non-obvious
relationships between them.  To use JAX-RPC you have to pull in
a whole bunch of non-obvious JARs (like mail.jar) because
some implementation aspect of jaxrpc-ri.jar depends on them.

Well, I thought naively, fortunately this is all fixable.
This is the problem we intended to solve with JAR dependencies.
One JAR can use a "Class-Path:" entry in its manifest to
specify what other JARs it depends on.  So I can just reference
a high-level JAR (such as jaxrpc.jar) and it can pull in the
implementation JARs behind the scenes.  Just like DLLs.

The JRE implements JAR dependencies correctly.  But javac
doesn't.  It seems to completely ignore the "Class-Path:"
entries in JAR files.

I was *very* surprised by this.  This is a pretty serious
ease-of-development problem for large projects with large
sets of class libraries.  It shouldn't be necessary for
developers to have to manually track all implementation
dependencies for all JARs they use.

This may be too late for Hopper.  But let's try and get it
fixed for Mantis.

###@###.### 2002-04-05

Comments
EVALUATION The classpath manifest entries are documented to apply only to the VM. This would therefore be a change of specification. The next release of the platform in which spec changes are contemplated is Tiger (1.5). ###@###.### 2002-04-05 ===================== I'll note that Solaris has been following a model where compatable interface extensions are alloweed in Micro releases. The existance of a distinct API definition (doc set) for Java 1.4.1 would tend to indicate the same is true for Java. Why would this compatable extension to the interface require a Minor release? Is it viewed as incompatable in some edge condition? ===================== Yes, it is incompatible in some edge conditions. See 4212732. ###@###.### 2002-12-16
16-12-2002