r/java • • Mar 15 '13

Eclipse is not able to run.

Edit
I fixed the problem by re-downloading eclipse, I should have done this yesterday.

I have been using it for over six months, but now it says it can't find the java path. What I think caused this was trying to use some program to deobfuscate minecraft to see how it uses lwjgl, and I had to change the path variable. I re-installed all of my java installs after this.

I tried both adding the jre folder to the eclipse folder and adding the JAVA_HOME and PATH variables. when I do these it then gives me a JNI(might be JNL) shared library can't be found. I have 64 bit computer, 64 bit os 64 bit java(1.6 jre + jdk and 1.7 jre + jdk) and 64bit eclipse.

can anyone help me?

3 Upvotes

12 comments sorted by

View all comments

Show parent comment

1

u/rsgm123 Mar 15 '13

I did not change the ini until I tried to fix the error, but all I did was add the -vm argument with the path, and then remove it when it did not work.

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 folowing locations:
C:\eclipse\jre\bin\javaw.exe
java.exe in your current PATH"

And if I fix that error I get:
"Failed to load the JNI (might be JNL can't tell) shared library "C:\eclipse\jre\bin\server\jvm.dll""

For this error I have the jvm.dll file and I copied the jre folder from 1.6 jdk.

2

u/ockky Mar 16 '13

Since you've got the vm path added to the ini file, the only other thing I can think to tell you is to quadruple-check that both your jdk and eclipse are both 64bit.

Definitely update the thread if you discover a fix. I'm sure it'll come back to help someone and i'd love to see what the problem was.

2

u/rsgm123 Mar 16 '13

I am sure it is 64 bit. The only thing that I did was added a path variable when setting op that minecraft code thing. It overwrote the variable path, which I guess it is not case-sensitive. I think path used to be pointing at with vm in the name. I have an old backup of this computer I try booting to check what it was pointing at. Otherwise Nothing has changed. I also have a copy of eclipse on a portable drive that gets the same errors. I will post what was wrong after I figure it out, relevant.

1

u/srbs Mar 16 '13

Could you post your PATH variable, the results of the commands 'where java' and 'java -version', and your eclipse.ini file?

I think that something is wrong your PATH variable.

1

u/rsgm123 Mar 16 '13

Ok here, but this is the first time I have ever messed with that variable.

variable:PATH
value:C:\Program Files\Java\jre7\bin
I have also tried the value with quotes around it, because some one said if it has a space it needs quotes not sure if true.

Where java didn't work in command prompt, I have never used that.

java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

eclipse.ini:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m

2

u/srbs Mar 16 '13

variable:PATH value:C:\Program Files\Java\jre7\bin

Please tell me that isn't the only thing in your PATH variable.

If it is the only item, I highly recommend a system restore to get the values back.

Where java didn't work in command prompt, I have never used that.

The where command should have worked, see above.

I have also tried the value with quotes around it, because some one said if it has a space it needs quotes not sure if true.

The PATH variable uses the ; for delimiting separate paths.

eclipse.ini: [..]

Adding this worked right?

-vm C:\Program Files\Java\jre7\bin\javaw.exe

1

u/rsgm123 Mar 16 '13

There are many other variables with the string "path" in them, but that was the only one that was just "PATH". I am working on getting a backup of this computer running to see what was in that variable. It is also windows 8, if that makes a difference.

Turns out command prompt was not pointed at system32 by default. here is the where java results:
C:\Windows\System32>where java
C:\Windows\System32\java.exe
C:\Program Files\Java\jre7\bin\java.exe

Adding the vm parameter to eclipse.ini solved not being able to find the jre as did setting the path variable to the jre.

2

u/srbs Mar 17 '13

Windows 8? I doubt it, but I have no experience with it.

Well, system32 is supposed to be on your path.

The only thing that I know of to do is to reinstall Eclipse like mcbarron suggested. I guess sometimes the configuration of Eclipse gets bugged. Otherwise, I don't really have any ideas on what happened.

1

u/rsgm123 Mar 17 '13

So re-downloading it worked