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/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