https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Java_Native_Interface
Java Native Interface - Revision history
2025-05-29T09:43:58Z
Revision history for this page on the wiki
MediaWiki 1.45.0-wmf.2
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1292533154&oldid=prev
HotMess: /* Mapping types */
2025-05-27T13:19:10Z
<p><span class="autocomment">Mapping types</span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:19, 27 May 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 109:</td>
<td colspan="2" class="diff-lineno">Line 109:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>In addition, the signature <code>"L {{Sic|hide=y|fully|-}}qualified-class ;"</code> would mean the class uniquely specified by that name; e.g., the signature <code>"Ljava/lang/String;"</code> refers to the class <del style="font-weight: bold; text-decoration: none;"><code></del>java.lang<del style="font-weight: bold; text-decoration: none;">.String<</del>/<del style="font-weight: bold; text-decoration: none;">code></del>. Also, prefixing <code>[</code> to the signature makes the array of that type; for example, <code>[I</code> means the int array type. Finally, a <code>void</code> signature uses the <code>V</code> code.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>In addition, the signature <code>"L {{Sic|hide=y|fully|-}}qualified-class ;"</code> would mean the class uniquely specified by that name; e.g., the signature <code>"Ljava/lang/String;"</code> refers to the class <ins style="font-weight: bold; text-decoration: none;">{{Javadoc:SE|package=</ins>java.lang<ins style="font-weight: bold; text-decoration: none;">|java</ins>/<ins style="font-weight: bold; text-decoration: none;">lang|String}}</ins>. Also, prefixing <code>[</code> to the signature makes the array of that type; for example, <code>[I</code> means the int array type<ins style="font-weight: bold; text-decoration: none;"> (<code>int[]</code>)</ins>. Finally, a <code>void</code> signature uses the <code>V</code> code.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>These types are interchangeable. One can use <code>jint</code> where you normally use an <code>int</code>, and vice versa, without any [[type conversion|typecast]]ing required. However, mapping between Java Strings and arrays to native strings and arrays is different. If a <code>jstring</code> is used where a <code>char *</code> would be, the code could crash the JVM.{{original research inline|date=February 2017}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>These types are interchangeable. One can use <code>jint</code> where you normally use an <code>int</code>, and vice versa, without any [[type conversion|typecast]]ing required. However, mapping between Java Strings and arrays to native strings and arrays is different. If a <code>jstring</code> is used where a <code>char *</code> would be, the code could crash the JVM.{{original research inline|date=February 2017}}</div></td>
</tr>
</table>
HotMess
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1292532509&oldid=prev
HotMess: /* Alternatives */ Foreign Function and Memory API javadoc link
2025-05-27T13:12:34Z
<p><span class="autocomment">Alternatives: </span> Foreign Function and Memory API javadoc link</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:12, 27 May 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 124:</td>
<td colspan="2" class="diff-lineno">Line 124:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Microsoft's proprietary implementation of a Java Virtual Machine ([[Visual J++]]) had a similar mechanism for calling native code from Java, called the ''Raw Native Interface'' (''RNI''). In addition, it had an easy way to call existing native code that was not itself aware of Java, such as (but not limited to) the Windows API, called ''J/Direct''. However, following the [[Visual J++#Litigation against J++|Sun–Microsoft litigation]] about this implementation, [[Visual J++]] is no longer maintained.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Microsoft's proprietary implementation of a Java Virtual Machine ([[Visual J++]]) had a similar mechanism for calling native code from Java, called the ''Raw Native Interface'' (''RNI''). In addition, it had an easy way to call existing native code that was not itself aware of Java, such as (but not limited to) the Windows API, called ''J/Direct''. However, following the [[Visual J++#Litigation against J++|Sun–Microsoft litigation]] about this implementation, [[Visual J++]] is no longer maintained.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>RNI was less clumsy to use than JNI, because no bookkeeping with a Java environment pointer was needed. Instead, all Java objects could be accessed directly. To facilitate this, a tool was used <del style="font-weight: bold; text-decoration: none;">that</del> <del style="font-weight: bold; text-decoration: none;">generated</del> header files from Java classes. Similarly, J/Direct was easier to use than using the necessary intermediate native library and JNI.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>RNI was less clumsy to use than JNI, because no bookkeeping with a Java environment pointer was needed. Instead, all Java objects could be accessed directly. To facilitate this, a tool was used <ins style="font-weight: bold; text-decoration: none;">to</ins> <ins style="font-weight: bold; text-decoration: none;">generate</ins> header files from Java classes. Similarly, J/Direct was easier to use than using the necessary intermediate native library and JNI.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java programmers easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java programmers easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Since Java 22, the newer Foreign Function and Memory API is encouraged for use over JNI, due to the reduced boilerplate and simplified interface.<ref>{{cite web|url= https://openjdk.org/jeps/454|title= JEP 454: Foreign Function & Memory API|date=7 April 2025|publisher=OpenJDK}}</ref> It is located in package <del style="font-weight: bold; text-decoration: none;"><code></del>java.lang.foreign<del style="font-weight: bold; text-decoration: none;"><</del>/<del style="font-weight: bold; text-decoration: none;">code></del>.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Since Java 22, the newer Foreign Function and Memory API is encouraged for use over JNI, due to the reduced boilerplate and simplified interface.<ref>{{cite web|url= https://openjdk.org/jeps/454|title= JEP 454: Foreign Function & Memory API|date=7 April 2025|publisher=OpenJDK}}</ref> It is located in package <ins style="font-weight: bold; text-decoration: none;">{{Javadoc:SE|package=</ins>java.lang.foreign<ins style="font-weight: bold; text-decoration: none;">|java</ins>/<ins style="font-weight: bold; text-decoration: none;">lang/foreign}}</ins>.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
</tr>
</table>
HotMess
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1284832253&oldid=prev
2620:101:F000:7C0:0:0:0:25CF at 00:26, 10 April 2025
2025-04-10T00:26:42Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:26, 10 April 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 128:</td>
<td colspan="2" class="diff-lineno">Line 128:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java programmers easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java programmers easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Since Java 22, the newer Foreign Function and Memory API is encouraged for use over JNI, due to the reduced boilerplate and simplified interface.<ref>{{cite web|url= https://openjdk.org/jeps/454|title= JEP 454: Foreign Function & Memory API|date=7 April 2025|publisher=OpenJDK}}</ref></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Since Java 22, the newer Foreign Function and Memory API is encouraged for use over JNI, due to the reduced boilerplate and simplified interface.<ref>{{cite web|url= https://openjdk.org/jeps/454|title= JEP 454: Foreign Function & Memory API|date=7 April 2025|publisher=OpenJDK}}</ref><ins style="font-weight: bold; text-decoration: none;"> It is located in package <code>java.lang.foreign</code>.</ins></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
</tr>
</table>
2620:101:F000:7C0:0:0:0:25CF
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1284832145&oldid=prev
2620:101:F000:7C0:0:0:0:25CF at 00:25, 10 April 2025
2025-04-10T00:25:47Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:25, 10 April 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 8:</td>
<td colspan="2" class="diff-lineno">Line 8:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The '''Java Native Interface''' ('''JNI''') is a [[foreign function interface]] programming [[software framework|framework]] that enables [[Java (programming language)|Java]] code running in a [[Java virtual machine]] (JVM) to call and be called by<ref name="role">{{cite web |url=https://docs.oracle.com/en/java/javase/11/docs/specs/jni/intro.html#java-native-interface-overview |title=Java Native Interface Overview |access-date=2018-12-27 |work= The Java Native Interface Programmer's Guide and Specification}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The '''Java Native Interface''' ('''JNI''') is a [[foreign function interface]] programming [[software framework|framework]] that enables [[Java (programming language)|Java]] code running in a [[Java virtual machine]] (JVM) to call and be called by<ref name="role">{{cite web |url=https://docs.oracle.com/en/java/javase/11/docs/specs/jni/intro.html#java-native-interface-overview |title=Java Native Interface Overview |access-date=2018-12-27 |work= The Java Native Interface Programmer's Guide and Specification}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></ref> native applications (programs specific to a hardware and [[operating system]] platform) and [[Library (computing)|libraries]] written in other languages such as [[C (programming language)|C]], [[C++]] and [[assembly language|assembly]].</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></ref> native applications (programs specific to a hardware and [[operating system]] platform) and [[Library (computing)|libraries]] written in other languages such as [[C (programming language)|C]], [[C++]] and [[assembly language|assembly]].</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Java 22 introduces the Foreign Function and Memory API, which can be seen as the successor to Java Native Interface.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Objectives ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Objectives ==</div></td>
</tr>
</table>
2620:101:F000:7C0:0:0:0:25CF
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1284452054&oldid=prev
Basil.bourque: /* Alternatives */Updated reference to preview version of specification document to refer to the official final version.
2025-04-07T17:45:33Z
<p><span class="autocomment">Alternatives: </span>Updated reference to preview version of specification document to refer to the official final version.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:45, 7 April 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 126:</td>
<td colspan="2" class="diff-lineno">Line 126:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java programmers easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java programmers easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Since Java <del style="font-weight: bold; text-decoration: none;">21</del>, the newer Foreign Function and Memory API is encouraged for use over JNI, due to the reduced boilerplate and simplified interface.<ref>{{cite web|url=https://openjdk.org/jeps/<del style="font-weight: bold; text-decoration: none;">442</del>|title=JEP <del style="font-weight: bold; text-decoration: none;">442</del>: Foreign Function & Memory API<del style="font-weight: bold; text-decoration: none;"> (Third Preview)</del>|date=<del style="font-weight: bold; text-decoration: none;">27 September</del> <del style="font-weight: bold; text-decoration: none;">2023</del> |publisher=OpenJDK}}</ref></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Since Java <ins style="font-weight: bold; text-decoration: none;">22</ins>, the newer Foreign Function and Memory API is encouraged for use over JNI, due to the reduced boilerplate and simplified interface.<ref>{{cite web|url=<ins style="font-weight: bold; text-decoration: none;"> </ins>https://openjdk.org/jeps/<ins style="font-weight: bold; text-decoration: none;">454</ins>|title=<ins style="font-weight: bold; text-decoration: none;"> </ins>JEP <ins style="font-weight: bold; text-decoration: none;">454</ins>: Foreign Function & Memory API|date=<ins style="font-weight: bold; text-decoration: none;">7</ins> <ins style="font-weight: bold; text-decoration: none;">April</ins> <ins style="font-weight: bold; text-decoration: none;">2025</ins>|publisher=OpenJDK}}</ref></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
</tr>
</table>
Basil.bourque
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1284301944&oldid=prev
Lorraine Crane: common typo "programer" corrected
2025-04-06T19:27:17Z
<p>common typo "programer" corrected</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:27, 6 April 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 124:</td>
<td colspan="2" class="diff-lineno">Line 124:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>RNI was less clumsy to use than JNI, because no bookkeeping with a Java environment pointer was needed. Instead, all Java objects could be accessed directly. To facilitate this, a tool was used that generated header files from Java classes. Similarly, J/Direct was easier to use than using the necessary intermediate native library and JNI.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>RNI was less clumsy to use than JNI, because no bookkeeping with a Java environment pointer was needed. Instead, all Java objects could be accessed directly. To facilitate this, a tool was used that generated header files from Java classes. Similarly, J/Direct was easier to use than using the necessary intermediate native library and JNI.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java <del style="font-weight: bold; text-decoration: none;">programers</del> easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java <ins style="font-weight: bold; text-decoration: none;">programmers</ins> easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Since Java 21, the newer Foreign Function and Memory API is encouraged for use over JNI, due to the reduced boilerplate and simplified interface.<ref>{{cite web|url=https://openjdk.org/jeps/442|title=JEP 442: Foreign Function & Memory API (Third Preview)|date=27 September 2023 |publisher=OpenJDK}}</ref></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Since Java 21, the newer Foreign Function and Memory API is encouraged for use over JNI, due to the reduced boilerplate and simplified interface.<ref>{{cite web|url=https://openjdk.org/jeps/442|title=JEP 442: Foreign Function & Memory API (Third Preview)|date=27 September 2023 |publisher=OpenJDK}}</ref></div></td>
</tr>
</table>
Lorraine Crane
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1277150813&oldid=prev
99.250.195.60: /* Alternatives */
2025-02-22T23:59:40Z
<p><span class="autocomment">Alternatives</span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:59, 22 February 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 125:</td>
<td colspan="2" class="diff-lineno">Line 125:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java programers easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Java Native Access|Java Native Access (JNA)]] is a community-developed library that provides Java programers easy access to native shared libraries without using JNI. However, this requires the redistribution of the dependent jar library. The tradeoff is between JNI being harder to code and JNA being slower.<ref>{{cite web |last1=Zakusylo |first1=Alexander |title=Github is also the original JNA source. JNA vs JNI benchmark speed tests |url=https://github.com/zakgof/java-native-benchmark |website=Github |publisher=Github |access-date=30 March 2023}}</ref> JNI is built in to core Java.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Since Java 21, the newer Foreign Function and Memory API is encouraged for use over JNI, due to the reduced boilerplate and simplified interface.<ref>{{cite web|url=https://openjdk.org/jeps/442|title=JEP 442: Foreign Function & Memory API (Third Preview)|date=27 September 2023 |publisher=OpenJDK}}</ref></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== See also ==</div></td>
</tr>
</table>
99.250.195.60
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1276271006&oldid=prev
75.22.163.163 at 21:52, 17 February 2025
2025-02-17T21:52:50Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:52, 17 February 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 6:</td>
<td colspan="2" class="diff-lineno">Line 6:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">In [[software design]], the</del> '''Java Native Interface''' ('''JNI''') is a [[foreign function interface]] programming [[software framework|framework]] that enables [[Java (programming language)|Java]] code running in a [[Java virtual machine]] (JVM) to call and be called by<ref name="role">{{cite web |url=https://docs.oracle.com/en/java/javase/11/docs/specs/jni/intro.html#java-native-interface-overview |title=Java Native Interface Overview |access-date=2018-12-27 |work= The Java Native Interface Programmer's Guide and Specification}}</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">The</ins> '''Java Native Interface''' ('''JNI''') is a [[foreign function interface]] programming [[software framework|framework]] that enables [[Java (programming language)|Java]] code running in a [[Java virtual machine]] (JVM) to call and be called by<ref name="role">{{cite web |url=https://docs.oracle.com/en/java/javase/11/docs/specs/jni/intro.html#java-native-interface-overview |title=Java Native Interface Overview |access-date=2018-12-27 |work= The Java Native Interface Programmer's Guide and Specification}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></ref> native applications (programs specific to a hardware and [[operating system]] platform) and [[Library (computing)|libraries]] written in other languages such as [[C (programming language)|C]], [[C++]] and [[assembly language|assembly]].</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></ref> native applications (programs specific to a hardware and [[operating system]] platform) and [[Library (computing)|libraries]] written in other languages such as [[C (programming language)|C]], [[C++]] and [[assembly language|assembly]].</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>
75.22.163.163
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1265489538&oldid=prev
Jerryobject: /* External links */ Adds: MOS:COMMENT, WP:CATEGORY.
2024-12-27T05:19:06Z
<p><span class="autocomment">External links: </span> Adds: <a href="/wiki/MOS:COMMENT" class="mw-redirect" title="MOS:COMMENT">MOS:COMMENT</a>, <a href="/wiki/Wikipedia:CATEGORY" class="mw-redirect" title="Wikipedia:CATEGORY">WP:CATEGORY</a>.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 05:19, 27 December 2024</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 170:</td>
<td colspan="2" class="diff-lineno">Line 170:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Java platform]]</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Java platform]]</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><!-- Hidden categories below --></div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Articles with example Java code]]</div></td>
</tr>
</table>
Jerryobject
https://en.wikipedia.org/w/index.php?title=Java_Native_Interface&diff=1265488686&oldid=prev
Jerryobject: /* Performance */ WP:REFerence WP:CITation parameter add. Spaced: MOS:EMDASH > colon (punctuation). WP:LINK update-standardize.
2024-12-27T05:13:44Z
<p><span class="autocomment">Performance: </span> <a href="/wiki/Wikipedia:REF" class="mw-redirect" title="Wikipedia:REF">WP:REFerence</a> <a href="/wiki/Wikipedia:CIT" class="mw-redirect" title="Wikipedia:CIT">WP:CITation</a> parameter add. Spaced: <a href="/wiki/MOS:EMDASH" class="mw-redirect" title="MOS:EMDASH">MOS:EMDASH</a> > <a href="/wiki/Colon_(punctuation)" title="Colon (punctuation)">colon (punctuation)</a>. <a href="/wiki/Wikipedia:LINK" class="mw-redirect" title="Wikipedia:LINK">WP:LINK</a> update-standardize.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 05:13, 27 December 2024</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 112:</td>
<td colspan="2" class="diff-lineno">Line 112:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Performance ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Performance ==</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>JNI incurs considerable overhead and performance loss under certain circumstances:<ref name="StackOverflow: What makes JNI calls slow?">{{cite web|url=https://stackoverflow.com/a/7809300/1068537|title=<del style="font-weight: bold; text-decoration: none;">java&nbsp;—</del> What makes JNI calls slow? <del style="font-weight: bold; text-decoration: none;">- </del>Stack Overflow}}</ref></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>JNI incurs considerable overhead and performance loss under certain circumstances:<ref name="StackOverflow: What makes JNI calls slow?">{{cite web|url=https://stackoverflow.com/a/7809300/1068537|title=<ins style="font-weight: bold; text-decoration: none;">Java:</ins> What makes JNI calls slow? <ins style="font-weight: bold; text-decoration: none;">|website=</ins>Stack Overflow}}</ref></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Function calls to JNI methods are expensive, especially when calling a method repeatedly.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Function calls to JNI methods are expensive, especially when calling a method repeatedly.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Native methods are not inlined by the JVM, nor can the method be [[Just-in-time compilation|JIT compiled]], as the method is already compiled.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Native methods are not inlined by the JVM, nor can the method be [[Just-in-time compilation|JIT compiled]], as the method is already compiled.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* A Java array may be copied for access in native code, and later copied back. The cost can be linear in the size of the array.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* A Java array may be copied for access in native code, and later copied back. The cost can be linear in the size of the array.</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* If the method is passed an object, or needs to make a callback, then the native method will likely be making its own calls to the JVM. Accessing Java fields, methods and types from the native code requires something similar to [[<del style="font-weight: bold; text-decoration: none;">Reflection (computer</del> programming<del style="font-weight: bold; text-decoration: none;">)|reflection</del>]]. Signatures are specified in strings and queried from the JVM. This is both slow and error-prone.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* If the method is passed an object, or needs to make a callback, then the native method will likely be making its own calls to the JVM. Accessing Java fields, methods and types from the native code requires something similar to [[<ins style="font-weight: bold; text-decoration: none;">reflective</ins> programming]]<ins style="font-weight: bold; text-decoration: none;"> (reflection)</ins>. Signatures are specified in strings and queried from the JVM. This is both slow and error-prone.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Java Strings are objects, have length and are encoded. Accessing or creating a string may require an O(n) copy.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Java Strings are objects, have length and are encoded. Accessing or creating a string may require an O(n) copy.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>
Jerryobject