Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6674167
Votes 0
Synopsis (dependency) Support JSR 277 in rmic
Category java:module
Reported Against
Release Fixed
State 6-Fix Understood, request for enhancement
Priority: 3-Medium
Related Bugs 4819896 , 6674169
Submit Date 11-MAR-2008
Description
JSR 277 needs tools to allow use of modules.  In most cases, this means looking for classes in the module system instead of on the classpath.
Posted Date : 2008-03-11 22:33:09.0
Work Around
N/A
Evaluation
Behaviorally, supporting JSR 277 in rmic would just seem to be a matter of adding support for new command line options similar to those added to other JDK tools for finding class definitions in modules, such as the -jam and -repository options described here:

    http://openjdk.java.net/projects/modules/jdktools.html 

There are currently two implementations of rmic in the JDK:

    (A): The long-standing implementation that uses the ancient
    "oldjavac" code (sun.tools.{asm,java,javac,tree,util}) for reading
    class files.  rmic is the only remaining user of that oldjavac
    code, which was the pre-1.3 version of javac (completely replaced
    by the GJ-derived version in 1.3).

    (B) A newer implementation introduced in JDK 5.0 based on the
    doclet API.  The problem with this implementation is that the CORBA
    backend hasn't been ported off of the "oldjavac" code yet, so this
    implementation does not support the -iiop/-idl options.  This
    implementation is currently activated with the "-Xnew" option.

(A) remains the default rmic implementation because (B) lacks the CORBA support, but we are expecting that to be fixed for JDK 7, after which (B) can become the default and (A) finally removed (along with the "oldjavac" code).  The CORBA work for this corresponds to jplan feature 288:

    http://jplan.sfbay/feature/288

The front end for rmic implementation (B) invokes the javadoc tool, passing its -classpath/etc. options through, to execute its doclet code (the bulk of the implementation) in a context for analyzing class files (the javah tool uses a similar implementation technique).  Assuming that javadoc is updated to support similar JSR 277-related options (see 6674169), updating rmic implementation (B) should be a simple matter of parsing the additional options and passing them through to javadoc.

It would be much more difficult to add JSR 277 option support to rmic implementation (A), because its class file reading code (and class path handling, etc.) is done by the "oldjavac" code mentioned above, a fragile old body of code that has barely been maintained for many years and for which there is very little engineering familiarity with.  We are counting on the ability to remove rmic implementation (A) for JDK 7 so that the question of adding JSR 277 support to it becomes moot.
Posted Date : 2008-05-22 18:50:04.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang