Eclipse not working - Java virtual machine not found

I installed eclipse and netbeans on mac osx 10.6 I installed android sdk and everything worked fine.

Now I installed mac ports and installed ImageMagick using macports

Now, after a reboot, neither the netbeans nor the eclipses work.

Net beans closes without errors. and eclipse give the following error:

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

I thought the problem might be in the way.

So, I tried running java and javac from the terminal. But these two teams work correctly.

Note: I don't have javaw (I'm not sure if we have this file on mac or not.

Can I find out what could be the problem and how can I fix it?

+7
source share
12 answers

@many thanks.

This is something or how it works after two restarts, you don’t need why ..

Thanks and sorry for bothering

0
source

In the Eclipse.app/Contents/MacOS/eclipse.ini file, put

-vm /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java 

right in front

  -vmargs 

should help, hopefully ... hopefully

+26
source

Check the Eclipse directory - and look in eclipse.ini for this line:

 -vm <path to java.exe - eg C:/Program Files (x86)/Java/jdk1.6.0_18/bin/javaw.exe> 

You are probably missing

+3
source

For users of Windows 7 - 64 bit (may work for others), you can do the following

1. If java Runtime is NOT installed (note that it is not installed with the Android SDK, you need to download it separately). You can download from here http://www.oracle.com/technetwork/java/javase/downloads/index.html (select "Java Platform (JDK) 7u21" from three options: first button :))

after installation, you will find javaw.exe in "C: \ Program Files (x86) \ Java \ jre6 \ bin"

2. set the environment variable as shown below

a) Right-click "Computer", select properties, select "System Preset"

b) In the "Advanced" section, select the last "Environment Variable" button

c) In the "System Settings" section, in the window that appears, find "Path"

d) select "Path", click "Edit"

e) Add ' ; C: \ Program Files (x86) \ Java \ jre6 \ bin '(this path or some path installed on your computer is used to separate other path variables that existed before and there is no need to specify;))

That's all! Now try running Eclipse.exe ( note: if you added an entry to eclipse.ini, as suggested by some ..please , delete it, otherwise it will throw another exception )

Remember that you do not need to change eclipse.ini

He works. Just double click eclipse.exe :)

+1
source

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

 <string>-vm</string><string>*$Actual Java location$*</string> 
+1
source

In eclipse Go to Windows β†’ Settings β†’ Java β†’ Installed JREs and see if there is any JRE there.

0
source

Caveat: I don't know anything about Mac, so YMMV.

Check out the JAVAHOME environment variable. On most systems, the JRE transfers its location to applications that want to run under the current JRE.

0
source

Download the standalone executable file on Java.com and make sure that if your system is 32-bit or 64-bit, you must download the one that suits your system. After installing Java, try running eclipse and it should work.

0
source

OK Therefore I added

`-vm

/ System / Library / Frameworks / JavaVM.framework / Versions / CurrentJDK / Home / bin / java`

to the eclipse.ini file, but it was always overwritten when I restarted Eclipse.

So, I did the following:

  • I created the folder structure mkdir -p jre/Contents/Home/jre/bin/ in the main eclipse folder
  • Changed directory: cd jre/Contents/Home/jre/bin/
  • A symbolic link has been made to the $ JAVA_HOME / bin / java folder: ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java

And after that, Eclipse works every time!

Hope this helps :)

0
source

Go to the "environment variables" from the "system presets".

Add the JAVA_HOME variable (both user and system variables) and value = "jre path": " C:\Program Files\Java\JDK_1.8\jre\bin ".

Add the jre path to the "Path" variable ...; C:\Program Files\Java\JDK_1.8\jre\bin ".

Then it works.

If there is still a problem, copy the jre directory to the path where the Eclipse IDE application is running.

0
source

For newer versions: Mac OS X El Capitan Version 10.11.6. path to current java version:

 /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java 

For Eclipse Neon. 1, open the eclipse.ini file from

 Eclipse.app/Contents/Eclipse/eclipse.ini 

and update the vm argument:

 -vm /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java 

before

 -vmargs 
0
source

Running Eclipse through the terminal worked for me. Try it.

0
source

All Articles