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.]
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.]
- relates to
-
JDK-4889342 (proxy) generated code should use static methods, not constructors, for boxing
-
- Closed
-
-
JDK-5096178 rmic should not generate code that constructs new instances of java.lang.Boolean
-
- Resolved
-
-
JDK-5083924 Options flags for tools are not standardized (-version, -classpath, -cp, etc...)
-
- Closed
-