JDK-5096183 : rmic should support a -target option
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2004-09-02
  • Updated: 2023-01-05
  • Resolved: 2023-01-05
Related Reports
Relates :  
Relates :  
Relates :  
Description
Perhaps rmic should support a general -target option similar to javac's in order to allow the user to specify that the generated classes can assume a particular Java platform.

Currently, rmic generates classes that only assume JDK 1.1 or, if the -v1.2 option is used, J2SE 1.2.  (The -v1.1, -vcompat, and -v1.2 options slightly affect the target platform assumption, but they are more focused on the JRMP stub/skeleton protocol version that the generated code should use.)

A general -target option would allow rmic to generate class files of more recent class file versions, like 48.0 or 49.0, for whatever that's worth.

As far as the source code generated by rmic, a "-target 1.5" option would allow rmic to generate code that uses the static factory methods of the java.lang primitive wrapper classes, instead of always constructing new instances, for boxing primitive values (to pass to RemoteRef.invoke).  The resulting code would be more efficient (in space and time).  [See 5096178 for a separate RFE for addressing this issue for booleans without the need for a -target option.]

Comments
Rmic has been removed.
05-01-2023

WORK AROUND
04-09-2004

SUGGESTED FIX
04-09-2004

PUBLIC COMMENTS
04-09-2004

EVALUATION This request seems reasonable, although it's not clear how important it is relative to the effort required to implement it. Note that the "old" rmic implementation (still currently the default) cannot generate class file versions later than 45.3 (i.e. JDK 1.1 era) because of the use of the old javac compiler. ###@###.### 2004-09-02
02-09-2004