Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: Could not find Java 2 Runtime Environment

I just installed Eclipse 3.5. Before I could install the Android Plugin I needed to install a Java jdk, which I did. After restart Im not able to start Eclipse anymore, because I receive the following error:

Error: could not finde Java 2 Runtime Environment

The weired thing is, that now I cant even open my other Eclipse Installations, that I use for PHP Programming. Any suggestions?

Update:

This is my eclipse.ini:

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.0.200.v20090519
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m
like image 405
Pascal Klein Avatar asked Nov 30 '22 17:11

Pascal Klein


2 Answers

You can explicitely tell your eclipse session which jdk/jre you want it to start with adding the following in your eclipse.ini:

-vm
c:/your/jre/bin/javaw.exe

For more info on how to startup your eclipse refer here

like image 153
dimitrisli Avatar answered Dec 05 '22 01:12

dimitrisli


I had a similar problem, with exception that Java was installed successfully. Once I added c:/my-path-to-java/jre/bin to PATH (system environment variable), Eclipse started successfully.

like image 39
makbeta Avatar answered Dec 05 '22 01:12

makbeta