Page 1 of 1

Eclipse cannot find Java

Posted: Mon Feb 24, 2014 5:02 am
by E4ODnut
I had to remove and re-install Java for an unrelated problem and now when I try and open Eclipse it tells me it can't find JAVA JRE. A check on Java tells me I have the most up to date version. Any idea how to fix this?

Re: Eclipse cannot find Java

Posted: Mon Feb 24, 2014 5:06 am
by AndreyB
You can edit eclipse.ini and add the path to java as new lines on the top

here is how mine looks like:

Code: Select all

-vm
C:/Program Files/Java/jre7/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-product
org.eclipse.epp.package.cpp.product
--launcher.XXMaxPermSize
256m
...
...
...

Re: Eclipse cannot find Java

Posted: Mon Feb 24, 2014 5:24 am
by E4ODnut
Sorry, I haven't got a clue where to even start to do that.

Re: Eclipse cannot find Java

Posted: Mon Feb 24, 2014 5:38 am
by AndreyB
Somewhere you have your eclipse folder. Somewhere in that folder you have eclipse.exe right?

Right next to it is the file you are looking for - eclipse.ini
Image

Re: Eclipse cannot find Java

Posted: Mon Feb 24, 2014 5:11 pm
by E4ODnut
Ah yes. It was there, just didn't have a .ini file extension.

Java is installed in Program Files(x86) on my computer, so I added a line similar to yours. Still no joy. Here's what my modified configuration file looks like:

-vm
C:/Program Files(x86)/Java/jre7/bin/javaw.exe-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.cpp.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m

Re: Eclipse cannot find Java

Posted: Mon Feb 24, 2014 5:15 pm
by AndreyB
Please install http://www.teamviewer.com/ - that's a remove PC control application, and tonight I can get into your PC and see what's going on :)

Re: Eclipse cannot find Java

Posted: Mon Feb 24, 2014 5:16 pm
by AndreyB
Wait a second

Code: Select all

-vm
C:/Program Files(x86)/Java/jre7/bin/javaw.exe-startup
vs

Code: Select all

-vm
C:/Program Files/Java/jre7/bin/javaw.exe
-startup
Looks at -startup

Re: Eclipse cannot find Java

Posted: Mon Feb 24, 2014 5:34 pm
by E4ODnut
Hmm. I don't see a difference there. If I open the configuration file with plain old Notepad, there is just one line, no spaces or line changes. If I open with Notepad++ there are line changes. I have no idea if any of that means anything.

I'll get Team Viewer installed

Re: Eclipse cannot find Java

Posted: Mon Feb 24, 2014 5:36 pm
by AndreyB
It looks like in your config "javaw.exe" is glued to "-startup" while "-startup" wants to have it's own line