RFR (S) JNI Specification Issue: JDK-8034923 JNI: static linking assertions specs are incomplete and are in the wrong section of spec

harold seigel harold.seigel at oracle.com
Tue Apr 14 14:49:13 UTC 2015


Hi David,

The changes look good.  Just a couple of nits (that can be ignored):

invocation.html:

1. "this applies..." could be a new sentence.  Also, remove the word 'even'?

+<p>A native library may be either dynamically linked or statically linked with
+the VM. The manner in which the library and VM image are combined is
+implementation dependent. A <code>System.loadLibrary</code> or equivalent
+API must succeed for a library to be considered loaded,*this applies*  to both
+dynamically and even statically linked libraries.



2. Change "If dynamically linked library defines ..." to "If *a* 
dynamically linked library defines ..."


3. Remove the second 'of'

+libraries may define <i>load</i> and <i>unload</i> function hooks. Naming of
+these*of*  functions depends upon whether the library was dynamically or statically
+linked.</p>



4. Rephrase "the programmer should be conservative on using Java VM 
services ..."  to "the programmer should *use VM services 
conservatively* ..."


jni-8.html:

1. Change "during class load and unloading." to "during class load*ing* 
and unloading."


2. Change "will be prohibited to link a library ..." to "will be 
prohibited *from linking* a library ..."


If you decide to use any of these suggestion, there's no need to post a 
new webrev.

Thanks, Harold

On 4/7/2015 7:37 AM, David Simms wrote:
>
> Couple of minor updates to the posted review
>
>  * SINCE: JDK/JRE 1.8 tags on JNI_OnLoad_L and JNI_OnUnload_L
>  * table mapping SE->JNI should use SE 6/7/8 not 6.0/7.0/8.0
>  * jniTOC.html: removed "Changes" link for ch.1.
>
>
>
> On 02/04/15 10:47, David Simms wrote:
>>
>> Greetings,
>>
>> JDK Bug: https://bugs.openjdk.java.net/browse/JDK-8034923
>>
>> Web review: http://cr.openjdk.java.net/~dsimms/jnispec/8034923/
>>
>> Original (for HTML comparison): 
>> http://docs.oracle.com/javase/8/docs/technotes/guides/jni/index.html
>>
>>
>> Summary of changes:
>>
>> Wholly confined to documentation changes, no code modifications made:
>>
>>   * The "index.html" has named a "JNI version" number which has never
>>     been consistent. After some initial consultation with Stuart Marks
>>     and Alex Buckley, we decided to remove version from the document.
>>       o There are minor clarifications added to "enhancements.html"
>>         and "GetVersion" function documentation, listing the platform
>>         release mapped to JNI_VERSION_<X_Y> constants.
>>   * Added the missing "JNI_VERSION_1_8" constant to GetVersion 
>> constants.
>>   * Moved most of the details regarding static library support (JEP
>>     178) from "Design - Compiling, Loading and Linking Native Methods"
>>     to "Invocation API - Library and Version Management"
>>       o Rewording to clearly delineate static vs dynamic linked
>>         library load and unload hooks
>>       o Emphasis on statically linked libraries requiring
>>         "JNI_OnLoad_<L>" hook.
>>       o Typos, function declaration and linkage sections cleaned up.
>>   * Reinstated the "Enhancements" links to JDK 1.2 & JDK 1.4 changes,
>>     and added new files for 1.6 and 1.8.
>>
>>
>> Cheers
>> /David Simms
>



More information about the hotspot-dev mailing list