<?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: Java JNI: Unsatisfied Link Error in Library Path</title>
	<atom:link href="http://www.slickdev.com/2009/05/05/java-jni-unsatisfied-link-error-in-library-path/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.slickdev.com/2009/05/05/java-jni-unsatisfied-link-error-in-library-path/</link>
	<description>Freelance Web and Software Developer</description>
	<lastBuildDate>Thu, 15 Jul 2010 14:20:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Chaoz</title>
		<link>http://www.slickdev.com/2009/05/05/java-jni-unsatisfied-link-error-in-library-path/comment-page-1/#comment-203</link>
		<dc:creator>Chaoz</dc:creator>
		<pubDate>Thu, 15 Jul 2010 14:20:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=88#comment-203</guid>
		<description>Glad it helped :)</description>
		<content:encoded><![CDATA[<p>Glad it helped <img src='http://www.slickdev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pale</title>
		<link>http://www.slickdev.com/2009/05/05/java-jni-unsatisfied-link-error-in-library-path/comment-page-1/#comment-202</link>
		<dc:creator>Pale</dc:creator>
		<pubDate>Wed, 14 Jul 2010 22:36:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=88#comment-202</guid>
		<description>Thanks, that was very useful!

The only different thing is that I had to add &#039;lib&#039; to the name of the shared library file (I am using Ubuntu 9.10 Karmic Koala):

g++ -shared HelloWorld.c -o libHelloWorld.so -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux</description>
		<content:encoded><![CDATA[<p>Thanks, that was very useful!</p>
<p>The only different thing is that I had to add &#8216;lib&#8217; to the name of the shared library file (I am using Ubuntu 9.10 Karmic Koala):</p>
<p>g++ -shared HelloWorld.c -o libHelloWorld.so -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neth</title>
		<link>http://www.slickdev.com/2009/05/05/java-jni-unsatisfied-link-error-in-library-path/comment-page-1/#comment-90</link>
		<dc:creator>Neth</dc:creator>
		<pubDate>Fri, 23 Oct 2009 11:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=88#comment-90</guid>
		<description>Hey! but fortunately I just got a solution last night.  Here is my command lines used to compile my dll: 

C:\Program Files\Microsoft  Visual Studio 9.0\VC\bin&gt;cl -I&quot;C:\Program Files\Java\include&quot; -I&quot;C:\Program Files\Java\include\win32&quot; -MD -LD HelloWorld.c -FeHelloWorld.dll 

There will be so many errors as my previous comment although, w/o the command -MD makes all errors disappeared and output as &quot;Hello World!&quot; perfectly after taking the command &gt;java HelloWorld   to run everything altogether.  

BTW, yes you should if you know the detail about these parameters it is used d/r compilation.  Because as far as I know -MD option ensures that HelloWorld.dll is linked with the Win32 multithreaded C library. The -LD option instructs the C compiler to generate a DLL instead of a regular Win32 executable.   

So, I am wondering about such a strange behavior of -MD command now.

Thanks for your suggestion</description>
		<content:encoded><![CDATA[<p>Hey! but fortunately I just got a solution last night.  Here is my command lines used to compile my dll: </p>
<p>C:\Program Files\Microsoft  Visual Studio 9.0\VC\bin&gt;cl -I&#8221;C:\Program Files\Java\include&#8221; -I&#8221;C:\Program Files\Java\include\win32&#8243; -MD -LD HelloWorld.c -FeHelloWorld.dll </p>
<p>There will be so many errors as my previous comment although, w/o the command -MD makes all errors disappeared and output as &#8220;Hello World!&#8221; perfectly after taking the command &gt;java HelloWorld   to run everything altogether.  </p>
<p>BTW, yes you should if you know the detail about these parameters it is used d/r compilation.  Because as far as I know -MD option ensures that HelloWorld.dll is linked with the Win32 multithreaded C library. The -LD option instructs the C compiler to generate a DLL instead of a regular Win32 executable.   </p>
<p>So, I am wondering about such a strange behavior of -MD command now.</p>
<p>Thanks for your suggestion</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chaoz</title>
		<link>http://www.slickdev.com/2009/05/05/java-jni-unsatisfied-link-error-in-library-path/comment-page-1/#comment-89</link>
		<dc:creator>Chaoz</dc:creator>
		<pubDate>Fri, 23 Oct 2009 00:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=88#comment-89</guid>
		<description>Hi Neth,

I&#039;m not so sure about MS VS C++ since its been years since I developed in that environment. But may i suggest looking for an option where you can add parameters during compilation?


thanks</description>
		<content:encoded><![CDATA[<p>Hi Neth,</p>
<p>I&#8217;m not so sure about MS VS C++ since its been years since I developed in that environment. But may i suggest looking for an option where you can add parameters during compilation?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neth</title>
		<link>http://www.slickdev.com/2009/05/05/java-jni-unsatisfied-link-error-in-library-path/comment-page-1/#comment-88</link>
		<dc:creator>Neth</dc:creator>
		<pubDate>Thu, 22 Oct 2009 11:00:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=88#comment-88</guid>
		<description>Hello there,

I am 3 days new about JNI.  I have been trying to compile exactly the same HelloWorld as I saw from the book here  http://java.sun.com/docs/books/jni/html/start.html#769.  I follow the step and finally I got the error complaint like:

java.lang.ClassLoader.loadLibrary0(Unknown Source)
java.lang.ClassLoader.loadLibrary0(Unknown Source)
java.lang.Runtime.loadLibrary0(Unknown Source)
java.lang.System.loadLibrary(Unknown Source)
HelloWorld.(clinit)(HelloWorld.java:7)

Anyone knows what is the equivalent command in MS VS c++ as -shared in dev-c++?  Please I am really stuck with that for 2 days.</description>
		<content:encoded><![CDATA[<p>Hello there,</p>
<p>I am 3 days new about JNI.  I have been trying to compile exactly the same HelloWorld as I saw from the book here  <a href="http://java.sun.com/docs/books/jni/html/start.html#769" rel="nofollow">http://java.sun.com/docs/books/jni/html/start.html#769</a>.  I follow the step and finally I got the error complaint like:</p>
<p>java.lang.ClassLoader.loadLibrary0(Unknown Source)<br />
java.lang.ClassLoader.loadLibrary0(Unknown Source)<br />
java.lang.Runtime.loadLibrary0(Unknown Source)<br />
java.lang.System.loadLibrary(Unknown Source)<br />
HelloWorld.(clinit)(HelloWorld.java:7)</p>
<p>Anyone knows what is the equivalent command in MS VS c++ as -shared in dev-c++?  Please I am really stuck with that for 2 days.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neth</title>
		<link>http://www.slickdev.com/2009/05/05/java-jni-unsatisfied-link-error-in-library-path/comment-page-1/#comment-87</link>
		<dc:creator>Neth</dc:creator>
		<pubDate>Wed, 21 Oct 2009 18:27:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=88#comment-87</guid>
		<description>Hello,

May I ask you about using Visual Studio c++ as well.  As I have the same problem as those errors, I have been searching for the solution but none of them can fix the problem.  What is the command in VS c that is equivalent to -shared in g++ that you used?


Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>May I ask you about using Visual Studio c++ as well.  As I have the same problem as those errors, I have been searching for the solution but none of them can fix the problem.  What is the command in VS c that is equivalent to -shared in g++ that you used?</p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
</channel>
</rss>
