Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse not working - No java virtual machine was found

I installed eclipse and netbeans on mac osx 10.6 I installed android sdk and everything was working perfectly.

Now I installed mac ports and installed ImageMagick using macports

Now after restarting the system neither netbeans work nor eclipse.

Net beans closes without any error. and eclipse give following error :

A JDK or JRE must be installed in order to run eclipse No java virtual machine is found after searching the following location: /Users....../eclipse.app ContentsMacOS/jre/bin/java java in you current PATH

I thought the problem might be with the path.

So I tried running java and javac from terminal. But these two commands run properly.

note: I don't have javaw (I am not sure whether we have this file in mac or not.

Can I know what can be the problem and how can I fix it ?

like image 478
Gaurav Shah Avatar asked May 05 '11 13:05

Gaurav Shah


People also ask

Why is Java Virtual Machine not working?

The most common cause for the “Could not create the Java Virtual Machine” error is that Java doesn't have enough available memory on your system to launch the VM client.


1 Answers

For me updating the eclipse.ini with -vm did not help. Rather, I had to update Eclipse.app/Contents/info.plist with below content(replace $Actual Java location$ with location of java:

<string>-vm</string><string>*$Actual Java location$*</string>
like image 182
rajbir singh Avatar answered Sep 22 '22 22:09

rajbir singh