Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Failed to load JNI shared library
icon4.gif  Failed to load JNI shared library [message #544613] Sun, 04 July 2010 22:28 Go to next message
Guido Stein is currently offline Guido SteinFriend
Messages: 4
Registered: July 2010
Junior Member
HI all,

I am getting the following error message when I try to run explipse:
Failed to load JNI shared library "Program Files (x86)\Java\jdk1.6.0_20\jre\bin\client\jvm.dll"


I am trying to use the Eclipse Release 3.6.0 which was last revised June 2, 2010.

I am running Vista home premium. I am running the exe as an admin. I have not put the eclipse folder into the program folder area.

I added the following to my ini file
 -vm
C:\Program Files (x86)\Java\jdk1.6.0_20\jre\bin



My ini is as follow
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.0.v20100503
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
-vm
C:\Program Files (x86)\Java\jdk1.6.0_20\jre\bin
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m


My computer return the following from "java -version"
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)


Please let me know if you have any thoughts about how to resolve this.
Re: Failed to load JNI shared library [message #544618 is a reply to message #544613] Mon, 05 July 2010 01:57 Go to previous messageGo to next message
Gomathi  is currently offline Gomathi Friend
Messages: 1
Registered: July 2010
Junior Member
Hi,

I had encountered the same error in my Windows 7 64-bit OS. I just uninstalled the jdk and did a fresh install from web to make sure that I installed the 64-bit version of jdk. This resolved the issue. Hope this helps.
Re: Failed to load JNI shared library [message #544620 is a reply to message #544618] Mon, 05 July 2010 03:42 Go to previous messageGo to next message
Guido Stein is currently offline Guido SteinFriend
Messages: 4
Registered: July 2010
Junior Member
sadly this did not work for me... the file exists
Re: Failed to load JNI shared library [message #544724 is a reply to message #544620] Mon, 05 July 2010 11:30 Go to previous messageGo to next message
Arttu  is currently offline Arttu Friend
Messages: 1
Registered: July 2010
Junior Member
Hi,

I got the same error message since I didn't have 64 bit Java and I was trying to run 64 bit version of Eclipse. Download and install the correct Java version.

Hope it helps! :)
Re: Failed to load JNI shared library [message #545075 is a reply to message #544613] Tue, 06 July 2010 14:47 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
On 7/4/10 6:28 PM, Guido Stein wrote:
> HI all,
>
> I am getting the following error message when I try to run
> explipse:Failed to load JNI shared library "Program Files
> (x86)\Java\jdk1.6.0_20\jre\bin\client\jvm.dll"
>
> I am trying to use the Eclipse Release 3.6.0 which was last revised June
> 2, 2010.
>
> I am running Vista home premium. I am running the exe as an admin. I
> have not put the eclipse folder into the program folder area.
>
> I added the following to my ini file
> -vm
> C:\Program Files (x86)\Java\jdk1.6.0_20\jre\bin

First, make sure that you're version of Eclipse and JDK match, either
both 64-bit or both 32-bit.
Second, the -vm argument in eclipse.ini must point to the java
executable, not just the directory. See
http://wiki.eclipse.org/Eclipse.ini for examples.

Hope this helps,
Eric



> My ini is as follow
> -startup
> plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
> --launcher.library
> plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1. 0.v20100503
> -product
> org.eclipse.epp.package.java.product
> --launcher.defaultAction
> openFile
> --launcher.XXMaxPermSize
> 256M
> -showsplash
> org.eclipse.platform
> -vm
> C:\Program Files (x86)\Java\jdk1.6.0_20\jre\bin
> --launcher.XXMaxPermSize
> 256m
> --launcher.defaultAction
> openFile
> -vmargs
> -Dosgi.requiredJavaVersion=1.5
> -Xms40m
> -Xmx384m
>
>
> My computer return the following from "java -version"
> java version "1.6.0_20"
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
>
> Please let me know if you have any thoughts about how to resolve this.
Re: Failed to load JNI shared library [message #545119 is a reply to message #545075] Tue, 06 July 2010 17:07 Go to previous messageGo to next message
Guido Stein is currently offline Guido SteinFriend
Messages: 4
Registered: July 2010
Junior Member
how can I tell if I am running a 64 or 32bit Java JDK?
Re: Failed to load JNI shared library [message #545341 is a reply to message #545119] Wed, 07 July 2010 13:25 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
On 7/6/10 1:07 PM, Guido Stein wrote:
> how can I tell if I am running a 64 or 32bit Java JDK?

Maybe the command "java -version" will tell you, I'm not sure and don't
have a Windows PC available to try.
I suspect it's 32-bit because your path includes "Program Files (x86)"
which, IIRC, is where Windows 64 installs 32-bit programs.

Hope this helps,
Eric
Re: Failed to load JNI shared library [message #545343 is a reply to message #545341] Wed, 07 July 2010 13:37 Go to previous messageGo to next message
Guido Stein is currently offline Guido SteinFriend
Messages: 4
Registered: July 2010
Junior Member
got it... yes, it was 32 bit issue... ok.. so it now works with 32 bit eclipse.

Thanks,

Guido
Re: Failed to load JNI shared library [message #559441 is a reply to message #545343] Thu, 16 September 2010 15:36 Go to previous messageGo to next message
Hugh  is currently offline Hugh Friend
Messages: 4
Registered: December 2009
Junior Member
I had exactly the same problem, the following error message:
Quote:

Failed to load the JNI shared library "C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll".



and your previous posts helped me solve it, so thanks a lot!

I am running Windows 7, and I knew it was a 64-bit machine with the ability to run 32-bit apps, but I downloaded the 64-bit version of Eclipse.

Eclipse first said I had no version of Java; it wasn't true, but Java was not in the PATH. Still, not knowing any better I downloaded and installed the latest version of Java.

I finally figured out how to add Java to the PATH. Now, when I opened up a CMD prompt and typed Java, Windows was able to find it. Progress.

The error message from Eclipse changed from not finding Java at all to the one of this thread.

Hmmm. Much head scratching and reinstalling and I was stuck.

Problem was that I was trying to run the 64-bit version of Eclipse, and Javea was the 32-bit version, shown by the fact it was installed in the "C:\Program Files (x86)" directory and not in the "C:\Program Files\" directory.

I could not figure out how to get a 64-bit version of Java. Hmmm. Never mind. Instead downloaded the 32-bit version of Eclipse.

Now I have both Eclipse and Java as 32-bit and both work together great!!

So thanks for all your help!

I would say, it would be better if Eclipse could somehow detect that which version of Java is being run and give a more helpful message like:

Quote:

This is the 64-bit [32-bit] version of Eclipse, but the version of Java is 32-bit [64-bit] and the two are not compatible.

Either change the version of Eclipse or the version of Java to be compatible.



That would help people go straight to the solution.
Re: Failed to load JNI shared library [message #658094 is a reply to message #544613] Sun, 06 March 2011 10:29 Go to previous messageGo to next message
Mohit Choudhary is currently offline Mohit ChoudharyFriend
Messages: 1
Registered: March 2011
Junior Member
Hi,
I am facing same problem.
(Failed to load the JNI shared library "C:\Program Files (x86)\Java\jre6\bin\client\jvm.dll")

My configuration is:-
Window 2007(64 bit) premium Edition.
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)

But now i wanna to know i have to installed jdk for 64 bit.
So after that i shall be able to resolve these problem.

Thanks guys.Now i shall update the Java for 64 bit version and then inform all you is problem fixed or not..

Thanks a LOT!!
Re: Failed to load JNI shared library [message #764015 is a reply to message #658094] Sun, 11 December 2011 05:34 Go to previous messageGo to next message
seeker7805 is currently offline seeker7805Friend
Messages: 2
Registered: December 2010
Junior Member
I received this error message also.

I am using windows 7 64 bit. I downloaded the jdk 64 bit version from oracle onto my laptop but for some reason windows loaded it in the Program (x86) directory rather than the regular C:\Program directory. Then I downloaded Eclipse classic 64 bit version. I received all kinds of errors. After putting the jdk path(not classpath!) in the environment variables I was still getting error messages. I even went to the eclipse.ini file to make sure it was pointing to the -vm path. I still got error messages.

I saw references in the forums about these issues and then I came across one that said you need to match up the java jre installation to the eclipse installation. Since windows put java\bin in the Programs (x86) directory I decided to delete the Eclipse 64bit version and just downloaded the 32bit version. Voila! it worked like a charm.

I have no idea why windows 7 64bit will download to the 32 bit directory, but it does.

I hope this helps.
Re: Failed to load JNI shared library [message #764182 is a reply to message #764015] Sun, 11 December 2011 15:47 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On 12/10/2011 11:34 PM, seeker7805 wrote:
> I received this error message also.
>
> I am using windows 7 64 bit. I downloaded the jdk 64 bit version from
> oracle onto my laptop but for some reason windows loaded it in the
> Program (x86) directory rather than the regular C:\Program directory.

This is an indication that you installed the 32 bit JDK. The JDK
installer will put the 32 bit jdk in the x86 directory.

You must have downloaded the 32 bit version from Oracle not the 64 bit
version.


> Then I downloaded Eclipse classic 64 bit version. I received all kinds
> of errors. After putting the jdk path(not classpath!) in the environment
> variables I was still getting error messages. I even went to the
> eclipse.ini file to make sure it was pointing to the -vm path. I still
> got error messages.
>
> I saw references in the forums about these issues and then I came across
> one that said you need to match up the java jre installation to the
> eclipse installation. Since windows put java\bin in the Programs (x86)
> directory I decided to delete the Eclipse 64bit version and just
> downloaded the 32bit version. Voila! it worked like a charm.
>
> I have no idea why windows 7 64bit will download to the 32 bit
> directory, but it does.
>
> I hope this helps.
Re: Failed to load JNI shared library [message #778260 is a reply to message #544613] Thu, 12 January 2012 02:28 Go to previous messageGo to next message
Xiao Ying Li is currently offline Xiao Ying LiFriend
Messages: 1
Registered: January 2012
Junior Member
I have both eclipse 32 bit and eclipse 64 bit in my computer, and I have both jdk for 32 bit and 64 bit as well. Both of the eclipse 32 and 64 work fine. The eclipse 32 bit version uses the default eclipse.ini. But for the eclipse.ini of the 64 bit version, I pointed to the 64 bit jdk. I added in the eclipse.ini:
"-vm
C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe"
before the line of "-vmargs", like this:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe
-vmargs
-Xms40m
-Xmx384m
Re: Failed to load JNI shared library [message #784528 is a reply to message #544618] Fri, 27 January 2012 17:00 Go to previous messageGo to next message
cory hula is currently offline cory hulaFriend
Messages: 1
Registered: January 2012
Junior Member
This worked for me. Thanks
Re: Failed to load JNI shared library [message #805640 is a reply to message #784528] Fri, 24 February 2012 01:20 Go to previous messageGo to next message
Wilbert Sequeira is currently offline Wilbert SequeiraFriend
Messages: 1
Registered: February 2012
Junior Member
It worked for me too!

Thanks!

Re: Failed to load JNI shared library [message #966810 is a reply to message #778260] Thu, 01 November 2012 08:48 Go to previous messageGo to next message
Guruman Guruman is currently offline Guruman GurumanFriend
Messages: 1
Registered: November 2012
Junior Member
It works perfectly.
Thanks.
Re: Failed to load JNI shared library [message #1006769 is a reply to message #966810] Fri, 01 February 2013 18:26 Go to previous messageGo to next message
Praba Prakash is currently offline Praba PrakashFriend
Messages: 1
Registered: February 2013
Junior Member
This Is Common Issue
1.First Check Your Eclipse Is 64Bit Or 32 Bit.
2.Then Download 32Bit Or 64Bit JDK.
3.SET PATH:
Copy Link Locations:
for 64 Bit.:
C:\Program Files\Java\jdk1.7.0_05\bin
for 32 Bit.:
C:\Program Files (x86)\Java\jdk1.7.0_05\bin
4.Goto->System Properties->Advanced System Setting->Environmental variables->
New->
VARIABLE NAME .: PATH
VARIABLE VALUE .:C:\Program Files\Java\jdk1.7.0_05\bin

VARIABLE VALUE DEPENDING ON 32 or 64.

5.Important
32 Bit ECLIPSE -32 Bit Java SDK
64 Bit ECLIPSE -64 Bit Java SDK
6.ENJOY
Re: Failed to load JNI shared library [message #1060911 is a reply to message #778260] Wed, 29 May 2013 06:47 Go to previous messageGo to next message
Jibin Jose is currently offline Jibin JoseFriend
Messages: 1
Registered: May 2013
Junior Member
This worked for me. Thanks Smile
Re: Failed to load JNI shared library [message #1081027 is a reply to message #544613] Tue, 06 August 2013 17:56 Go to previous messageGo to next message
Maximilian Bloom is currently offline Maximilian BloomFriend
Messages: 1
Registered: August 2013
Junior Member
I'm having the same problem, and have had no luck yet. I'm using the default eclipse.ini, i have 64 bit java jdk, my path is set to C:\Program Files\Java\jdk1.7.0_25\bin (so is my classpath), and I have 64 bit eclipse (standard 4.3). My error is, of course, Failed to load the JNI shared library "C:\Program Files\Java\jre7\bin\client\jvm.dll".
I checked that directory, and the file exists.
Please help! Sad
Re: Failed to load JNI shared library [message #1097586 is a reply to message #544613] Thu, 29 August 2013 23:20 Go to previous messageGo to next message
ryk rod is currently offline ryk rodFriend
Messages: 1
Registered: August 2013
Junior Member
All I Know Is Through All The Struggle Tryna Get Eclipse To Work,
First after downloading and running Eclipse(x64bit)
I've Gotten The Errors:

A java Runtime Environment (JRE) or Java Development kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: C:\eclipse\jre\javaw.exe javaw.exe in your current PATH

I Tried Changing Paths On My Remote Setting from Control Panel, I Made A Path To Where My Java(x64bit) was installed.
Retried Loading The Eclipse Application and It Started Running But,
I Got A New Error:

Failed to load the JNI shared library "C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll

Anyways, None Of This Was Working And I Made Sure I Downloaded Both Eclipse(x64bit) and I Went To Java To Download The Java(x64bit)
It Said I Had The Current Java Intalled Already Up To date.

Still Didn't Work.....

But, I Saw Someone Saying They Might Have Had Java(x32bit) Running Even Though They Installed Java(x64)....They Tried Eclipse(x32bit) and It Worked For Them.

I Been Tryna Use Eclipse(x64bit) Because, Well You Know, I Usually Get/Run x64Bit.
But Never Worked For Eclipse.

So, I Deleted All The Eclipse and Downloaded The Eclipse(x32bit)
Extracted, Ran The Eclipse Application,
And It Loaded Up And Worked Right Away.
I Didn't Even Have To Change Path Unless Because I Already Have A Path In Remote Settings.

Anyways, It Worked, I Advise You Trying Both Eclipse (x32bit)/(x64bit).

If None Runs Try Going To
Control Panel / System / Remote Settings / Advance Tab / Enviroment Variables /

If You Dont Have A PATH On Top, Click New And Make PATH With Directory to Wherever Your Java Is Installed.
Bottom One Edit To Directory to Wherever Your Java Is Installed.


I Never Post So Thank Me If This Helps Smile
Re: Failed to load JNI shared library [message #1196653 is a reply to message #544618] Tue, 19 November 2013 14:24 Go to previous messageGo to next message
Mario Igrec is currently offline Mario IgrecFriend
Messages: 1
Registered: November 2013
Junior Member
Gomathi wrote on Sun, 04 July 2010 21:57
Hi,

I had encountered the same error in my Windows 7 64-bit OS. I just uninstalled the jdk and did a fresh install from web to make sure that I installed the 64-bit version of jdk. This resolved the issue. Hope this helps.


This worked!! Thanks. If it's 64 bit Eclipse you've installed, you need the 64 bit JRE (JRE 6u45 is what I have).
Re: Failed to load JNI shared library [message #1389751 is a reply to message #544613] Sat, 28 June 2014 08:51 Go to previous messageGo to next message
Bill H. is currently offline Bill H.Friend
Messages: 1
Registered: June 2014
Junior Member
soooo when i tried to open the eclipse that was bundled in the latest 64-bit android SDK, the error message read
Failed to load the JNI shared library "C:\Java\jdk1.8.0_05\jre\bin\client\jvm.dll".

then i went on for a solution and found the
-vm
argument. so i gave it a try and added
-vm
C:\Java\jdk1.8.0_05\jre\bin\client\jvm.dll

to my eclipse.ini. so now this is my eclipse.ini:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807
-product
adtproduct
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Java\jdk1.8.0_05\jre\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m

but the problem still persists. i'm out of options. i need help Sad
p/s: yes i did check and found that i do have the 64-bit trio: 64-bit windows 8.1, 64-bit jdk and 64-bit eclipse.
Re: Failed to load JNI shared library [message #1390075 is a reply to message #1389751] Sat, 28 June 2014 21:43 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 06/28/2014 10:35 AM, Bill H. wrote:
> soooo when i tried to open the eclipse that was bundled in the latest
> 64-bit android SDK, the error message read Failed to load the JNI shared
> library "C:\Java\jdk1.8.0_05\jre\bin\client\jvm.dll".
> then i went on for a solution and found the -vm argument. so i gave it a
> try and added -vm
> C:\Java\jdk1.8.0_05\jre\bin\client\jvm.dll
>
> to my eclipse.ini. so now this is my eclipse.ini:
> -startup
> plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
> --launcher.library
> plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807
>
> -product
> adtproduct
> --launcher.XXMaxPermSize
> 256M
> -showsplash
> org.eclipse.platform
> --launcher.XXMaxPermSize
> 256m
> --launcher.defaultAction
> openFile
> -vm
> C:\Java\jdk1.8.0_05\jre\bin\client\jvm.dll
> -vmargs
> -Dosgi.requiredJavaVersion=1.6
> -Xms40m
> -Xmx768m
>
> but the problem still persists. i'm out of options. i need help :(
> p/s: yes i did check and found that i do have the 64-bit trio: 64-bit
> windows 8.1, 64-bit jdk and 64-bit eclipse.

http://wiki.eclipse.org/Eclipse.ini

suggests that you should instead have:

-vm
C:\Java\jdk1.8.0_05\bin\javaw.exe

or

C:\Java\jdk1.8.0_05\jre\bin\java.exe


Also, please be advised that there is not going to be a lot of help for
"bundled" Eclipse, that is, Eclipse not from eclipse.org. Please read
the sticky post at the top of this forum.

http://www.eclipse.org/forums/index.php/t/225513/

Cheers
Re: Failed to load JNI shared library [message #1396126 is a reply to message #544613] Mon, 07 July 2014 22:42 Go to previous messageGo to next message
Olatomiwa ajayi is currently offline Olatomiwa ajayiFriend
Messages: 2
Registered: July 2014
Junior Member
Ive done everything still no change im Very sad all my riends have gotten to coding im still on this please help
Re: Failed to load JNI shared library [message #1396297 is a reply to message #1396126] Tue, 08 July 2014 05:27 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Olatomiwa ajayi wrote on Mon, 07 July 2014 18:42
Ive done everything still no change im Very sad all my riends have gotten to coding im still on this please help

What do you mean, "everything?" This thread started almost 4 years ago. Surely there's something different in your case compared to what's been posted in that time.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Failed to load JNI shared library [message #1396549 is a reply to message #1396297] Tue, 08 July 2014 13:15 Go to previous message
Olatomiwa ajayi is currently offline Olatomiwa ajayiFriend
Messages: 2
Registered: July 2014
Junior Member
ive pathed and done all sutions I this forums
Previous Topic:no html output page
Next Topic:Reopen project -> edit and run
Goto Forum:
  


Current Time: Fri Mar 29 05:38:01 GMT 2024

Powered by FUDForum. Page generated in 0.05539 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top