1

First off, I've been trying to launch Eclipse but I kept getting the below error

Failed to load JNI shared library "C:\Program Files (x86)\Java\jdk1.8.0_25\bin...\jre\bin\client\jvm.dll"

So I looked through this thread Failed to load the JNI shared Library (JDK)

The sensing I got was that I might want to uninstall Java and make sure I have the right 64 bit version, since I already have a 64 bit Eclipse.

I went ahead and went to uninstall the Java Update files via the control panel, which went fine.

Then when I tried to delete the Java files in my Program Files (x86) folder, I can't do it as the "file is being used by another process"

Now I can't install a new version of Java as I get an error code 1603 owing to the incomplete Java files, and I still got my JNI shared library error to fix.

I'm really stuck now. What do I do?

Community
  • 1
  • 1
Kenneth Yong
  • 375
  • 1
  • 6
  • 14
  • You should uninstall Java from the Control Panel, instead of deleting files manually. Also, close all your running programs to ensure Java isn't in use. – forgivenson Dec 16 '14 at 13:51
  • 1
    Do you have Process Explorer? It has the ability to find references to handles by other processes (ie, java.exe in your case) so you can see which process has a handle to it. May be a bit overkill for this general purpose, but I've been on the Process Explorer bandwagon recently – Anthony Forloney Dec 16 '14 at 13:51
  • 1
    try restart then try delete files again – Yazan Dec 16 '14 at 13:52
  • 2
    Should this be in [Super User](http://superuser.com/)? – Evil Dog Pie Dec 16 '14 at 13:53
  • @forgivenson I can't find the Jdk and Jre files in my "Programs and Features" section of my control panel, which is why I resorted to manual deletion, which isn't working for me :/ – Kenneth Yong Dec 16 '14 at 13:54
  • @Yazan restarting the computer turned out to be the solution for Java deletion! Bummed that I never imply did that -_- – Kenneth Yong Dec 16 '14 at 14:24

2 Answers2

0

ctrl+shift+esc open task manager and end all processes that are opened by java. Sometimes when you run java and your applications don't close properly, java run-time environment is still running. So you have to force java out of that state. Next time, i'd just install the newer version of java right on top of the old one. Because the installation process removes the old version of java for you and replaces it with the newest one.

with jframes using the code

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)

this is essential to your program so it closes completely.

Roger
  • 3,226
  • 1
  • 22
  • 38
0

If you use 64 bit eclipse, you need a 64 bit operating system and 64 bit JDK. Close your eclipse and JDK, remove X86 JDK and install 64bit JDK.

  • Thanks! I realized that installing at x86 is for 32-bit files, so I went and got the 64-bit one and now it works perfectly :) – Kenneth Yong Dec 16 '14 at 14:25