JDK-8153647 : Update javah to be multi-release jar aware
Type:Sub-task
Component:core-libs
Affected Version:9
Priority:P3
Status:Closed
Resolution:Other
Submitted:2016-04-06
Updated:2016-06-02
Resolved:2016-06-02
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
It's possible javah does not need to be multi-release aware, so first an investigation is in order and if it needs updating, update it.
Comments
The issue requested an investigation to determine if javah is multi-release jar aware. The investigation concluded that it is. No further work is required.
02-06-2016
javah uses javac and javac is multi-release jar aware, thus javah is also multi-release jar aware. This can be demonstrated by the following test with the attached HelloWorld.jar
$ javah -cp HelloWorld.jar hello.HelloWorld
This creates the file hello_HelloWorld.h. Inspection of the file reveals declarations for
Java_hello_HelloWorld_print and Java_hello_HelloWorld_printf
Those correspond to the native methods in the META-INF/versions/9/hello/HelloWorld.class.
If javah was not multi-release jar aware, the declaration for printf (Java_hello_HelloWorld_printf) would
not be in the output file hello_HelloWorld.h.