Reputation: 11
A Java Run Time Environment(JRE) or Java development Kit (JDK) must be available in order to run eclipse. No Java virtual machine was found after searching the following locations: H:\Important Software\eclipse\jre\bin\javaw.exe java.exe in your current path
These are shown while I am trying to start eclipse. But some days ago I have worked with eclipse fine. and I have checked java path in my system and environment variable. All are okay. Hence eclipse does not starting. I have restarted my pc also.
One thing I have to mention that javac
command did not work while I was trying to compile my java code from command promt. Then I used this command to set path that is set path = C:\Program Files\Java\jdk-9.0.4
. After that javac
command was working fine. But now this problem occurs. eclipse did not starting.
And the main problem is my system is finding the jdk/jre in H drive where I put eclipse IDE but not the jdk/jre. I don't understand what's happening.
Upvotes: 0
Views: 9797
Reputation: 1
For mac the setting for the jvm is in Eclipse.app/Contents/Info.plist for it is: /Users/"username"/eclipse/java-2021-06/Eclipse.app/Contents/Info.plist
<!-- To use a specific Java version (instead of the default) uncomment the following option and
edit it to add a VM. Installed VMs can be found via $/usr/libexec/java_home -V
-->
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/bin/java</string>
Upvotes: 0
Reputation: 288
you have to all set classpath
Follow this In user Environment variable set
VariableName variableValue
CLASSPATH .;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib;
JAVA_HOME jdkpath( example :C:\Program Files\Java\jdk1.8.0_151)
JRE_HOME %JAVA_HOME%\jre
And in system variable
Add path
path %JAVA_HOME%\bin;
Now you can work in all IDEs
Upvotes: 1
Reputation: 1
Go to eclipse home and find this eclipse.ini file. Check if this file has vm settings in it.
If it has something like below change it to your java path or remove it if your JAVA_HOME env variable is set
-vm H:\Important Software\eclipse\jre\bin\javaw.exe
Upvotes: 0