<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Making JNI cross platform</title>
	<atom:link href="http://javablog.co.uk/2007/05/19/making-jni-cross-platform/feed/" rel="self" type="application/rss+xml" />
	<link>http://javablog.co.uk/2007/05/19/making-jni-cross-platform/</link>
	<description>by Java coders, for Java coders</description>
	<lastBuildDate>Tue, 07 Sep 2010 06:16:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Dmitri</title>
		<link>http://javablog.co.uk/2007/05/19/making-jni-cross-platform/comment-page-1/#comment-98306</link>
		<dc:creator>Dmitri</dc:creator>
		<pubDate>Fri, 11 Jun 2010 23:55:19 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/2007/05/19/making-jni-cross-platform/#comment-98306</guid>
		<description>&lt;p&gt;Thanks for this - saved me a lot of poking around to find the different options.  One to add: x86 is now reported as &#039;x86&#039;.&lt;/p&gt;

&lt;p&gt;By the way, that assert is a little misplaced - &lt;code&gt;toLowerCase()&lt;/code&gt; can&#039;t return &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for this - saved me a lot of poking around to find the different options.  One to add: x86 is now reported as &#8216;x86&#8217;.</p>

<p>By the way, that assert is a little misplaced - <code>toLowerCase()</code> can&#8217;t return <code>null</code>.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: zeeman</title>
		<link>http://javablog.co.uk/2007/05/19/making-jni-cross-platform/comment-page-1/#comment-8693</link>
		<dc:creator>zeeman</dc:creator>
		<pubDate>Mon, 14 Jul 2008 19:31:26 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/2007/05/19/making-jni-cross-platform/#comment-8693</guid>
		<description>&lt;p&gt;Have a look at one-jar
It supports a single jar for different os.arch/os.name with native libraries.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Have a look at one-jar
It supports a single jar for different os.arch/os.name with native libraries.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: John Abraham</title>
		<link>http://javablog.co.uk/2007/05/19/making-jni-cross-platform/comment-page-1/#comment-6678</link>
		<dc:creator>John Abraham</dc:creator>
		<pubDate>Tue, 01 Apr 2008 15:43:52 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/2007/05/19/making-jni-cross-platform/#comment-6678</guid>
		<description>&lt;p&gt;Hello there Sam.  I notice you are using MTJ and JNI matrix operations. I fixed some bugs in MTJ, and see you have too.  We need to move MTJ to a new server.  Can you contact me?  Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hello there Sam.  I notice you are using MTJ and JNI matrix operations. I fixed some bugs in MTJ, and see you have too.  We need to move MTJ to a new server.  Can you contact me?  Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://javablog.co.uk/2007/05/19/making-jni-cross-platform/comment-page-1/#comment-36</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Sun, 20 May 2007 17:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/2007/05/19/making-jni-cross-platform/#comment-36</guid>
		<description>&lt;p&gt;Paul, it&#039;s all matrix stuff... a Fortran library that sits atop of &lt;a href=&quot;www.netlib.org/blas&quot; rel=&quot;nofollow&quot;&gt;BLAS&lt;/a&gt; and &lt;a href=&quot;www.netlib.org/lapack&quot; rel=&quot;nofollow&quot;&gt;LAPACK&lt;/a&gt;. We got a 20x speedup using the JNI! The matrix library &lt;a href=&quot;http://rs.cipr.uib.no/mtj/&quot; rel=&quot;nofollow&quot;&gt;MTJ&lt;/a&gt; has a JNI substitute for some of its internal calculations, but it actually has some serious bugs in its JNI code... I&#039;ve been in contact with the author about a few other bugs, so I&#039;ll probably collate a big patch at some point and send it over.&lt;/p&gt;

&lt;p&gt;I don&#039;t expect the JNI to work as fast on JVMs that do not support &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/javasdk/v5r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.50/html/jni_copypin.html&quot; rel=&quot;nofollow&quot;&gt;pinning&lt;/a&gt; (e.g. the IBM JVM) as it involves GB arrays being passed between Java and C... we explicitly check for that.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Paul, it&#8217;s all matrix stuff&#8230; a Fortran library that sits atop of <a href="www.netlib.org/blas" rel="nofollow">BLAS</a> and <a href="www.netlib.org/lapack" rel="nofollow">LAPACK</a>. We got a 20x speedup using the JNI! The matrix library <a href="http://rs.cipr.uib.no/mtj/" rel="nofollow">MTJ</a> has a JNI substitute for some of its internal calculations, but it actually has some serious bugs in its JNI code&#8230; I&#8217;ve been in contact with the author about a few other bugs, so I&#8217;ll probably collate a big patch at some point and send it over.</p>

<p>I don&#8217;t expect the JNI to work as fast on JVMs that do not support <a href="http://publib.boulder.ibm.com/infocenter/javasdk/v5r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.50/html/jni_copypin.html" rel="nofollow">pinning</a> (e.g. the IBM JVM) as it involves GB arrays being passed between Java and C&#8230; we explicitly check for that.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://javablog.co.uk/2007/05/19/making-jni-cross-platform/comment-page-1/#comment-35</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Sun, 20 May 2007 17:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/2007/05/19/making-jni-cross-platform/#comment-35</guid>
		<description>&lt;p&gt;I probably exaggerated by saying it&#039;s a &lt;em&gt;big&lt;/em&gt; disadvantage not to be able to ship native libs in the jar, but it is certainly an inconvenience. I prefer the idea of one file per version (for small to medium builds), rather than one file per version per OS per CPU, as that defeats the point of compile once run anywhere.&lt;/p&gt;

&lt;p&gt;Incidentally, I would never encourage use of a JNI library as a complete replacement for a Java library... we always have a pure Java alternative sitting there for automatic use if the JNI version isn&#039;t available.&lt;/p&gt;

&lt;p&gt;Even in our build system it is also easier to have a flat list of files... a directory structure would mean having to get all the developers to setup system variables for each JNI they may be running.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I probably exaggerated by saying it&#8217;s a <em>big</em> disadvantage not to be able to ship native libs in the jar, but it is certainly an inconvenience. I prefer the idea of one file per version (for small to medium builds), rather than one file per version per OS per CPU, as that defeats the point of compile once run anywhere.</p>

<p>Incidentally, I would never encourage use of a JNI library as a complete replacement for a Java library&#8230; we always have a pure Java alternative sitting there for automatic use if the JNI version isn&#8217;t available.</p>

<p>Even in our build system it is also easier to have a flat list of files&#8230; a directory structure would mean having to get all the developers to setup system variables for each JNI they may be running.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Hammant</title>
		<link>http://javablog.co.uk/2007/05/19/making-jni-cross-platform/comment-page-1/#comment-34</link>
		<dc:creator>Paul Hammant</dc:creator>
		<pubDate>Sun, 20 May 2007 03:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/2007/05/19/making-jni-cross-platform/#comment-34</guid>
		<description>&lt;p&gt;Out of interest, what was the mathematics operation you were speeding up by calling JNI ?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Out of interest, what was the mathematics operation you were speeding up by calling JNI ?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Casper Maxwell</title>
		<link>http://javablog.co.uk/2007/05/19/making-jni-cross-platform/comment-page-1/#comment-33</link>
		<dc:creator>Casper Maxwell</dc:creator>
		<pubDate>Sat, 19 May 2007 21:05:12 +0000</pubDate>
		<guid isPermaLink="false">http://javablog.co.uk/2007/05/19/making-jni-cross-platform/#comment-33</guid>
		<description>&lt;p&gt;Nice post but why do you think &quot;This has a big disadvantage as it doesn’t allow you to include native libraries in jar files.&quot;? I dont see any BIG disadvantage. If it is a big project, you should already have an installer which copies required jars and dlls to installation directory. And for small projects you can directly give specific jars + dlls for specific os+architecture.&lt;/p&gt;

&lt;p&gt;But you are right that naming is a problem (although not a big one).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice post but why do you think &#8220;This has a big disadvantage as it doesn’t allow you to include native libraries in jar files.&#8221;? I dont see any BIG disadvantage. If it is a big project, you should already have an installer which copies required jars and dlls to installation directory. And for small projects you can directly give specific jars + dlls for specific os+architecture.</p>

<p>But you are right that naming is a problem (although not a big one).</p>]]></content:encoded>
	</item>
</channel>
</rss>
