Eclipse not running (even with JRE installed) [duplicate] - eclipse

This question already has answers here:
Eclipse - no Java (JRE) / (JDK) ... no virtual machine
(35 answers)
Closed 9 years ago.
I have JRE 6 installed (can't update due to admin restrictions), but all of a sudden Eclipse won't start up. It has worked in the past. Here's the error message I'm getting:
A Java Runtime 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:
C:\Documents and Settings\USER\Desktop\eclipse\jre\bin\javaw.exe
javaw.exe in your cuurent PATH
If this is due to some sort of admin restrictions (nothing seems to be different from before), is there a way I can use Eclipse in another way? Perhaps without the JRE?
EDIT: jre\bin\javaw.exe does not exist. Why is it looking for it there?

Check the -vm entry in the eclipse.ini configuration file. The format is
-vm /path/to/jre/bin/javaw.exe
If this entry does not exist, then Eclipse is using the a JRE on the current system's PATH
Change/add the -vm entry to point to a new existing JRE.

Please check your environment settings. Your JAVA_HOME should point to Java Folder and Path should have JAVA_HOME/bin;

Related

Having trouble installing Eclipse

I have a new computer (Windows 10, 64bit) and I can't install Eclipse.
I downloaded a file called "eclipse-inst-win64.exe" and a file called "jdk-12.0.1_windows-x64_bin". When I try to open or run as and administrator the Eclipse, I recieve the following message:
"A Java Runtime Enviorment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse Installer. No Java virtual machine was found after searching the following locations:
C:\Users\USER\Downloads\eclipse-inst-win64\jre\bin\javaw.exe
javaw.exe in your current PATH".
What did I do wrong? What should I do? Thanks.
Of course, you have to install jdk FIRST. Make sure to set your JAVA_HOME system environment variable to the folder where you installt jdk-12.0.1 and add the bin folder of the jdk to the PATH environment variable. You can test your installation: open a PowerShell and execute java -version. It should display your installed version. If not, the variables are not set correct.

Rascal Eclipse plugin installation error: "Rascal needs a Java Development Kit (JDK)"

I am trying to install Rascal, but I get an error while doing so.
I followed the instructions at https://www.rascal-mpl.org/start/
installed the second latest Java 1.8 SDK version 191
installed the latest Eclipse version for windows, 64 bit (2018-09):
installed Rascal via Help > New Software (using the stable version: https://update.rascal-mpl.org/stable/)
Until here everything appeared to go well.
After starting Eclipse, I switched to the Rascal Perspective using Window>Perspective>Open Perspective> Other ...>Rascal
I created a new project called rascal-test
Now the error appears: Rascal needs a Java Development Kit (JDK), ...
According the Windows-settings a JDK is installed
The Eclipse setting shows two JRE's (Standard VM).
Deinstalling/Re-installing the software and Rebooting the system did not help.
Does anyone have any advice to overcome this error?
It's a configuration issue where Eclipse does not use the right Java installation automatically. You're not the first to run into this one (throubleshooting).
The way to fix it is described here. It requires locating your eclipse.ini file and pointing Eclipse to the JDK. C:\Program Files\eclipse\eclipse.ini for windows users, sometimes. Be careful with the spaces and the newlines in that file, because they're pretty sensitive. Also it's a good time to increase stack size and heap memory while you're at it, which is also described here
I've included the answer on that page here for easier reference:
find the file first
on MacOSX it may be in
/Applications/Eclipse.app/Contents/MacOS/eclipse.ini
on Windows it may be in C:\Program Files\eclipse\eclipse.ini
on Linux its where you extracted the eclipse tarball.
then find the line that starts with -vm and add on the next separate line
the path to the java run-time binary, e.g. /usr/bin/java or C:\Program
Files\Java SDK 1.8\bin\javaw (note there is no .exe).
If you can't find the line that starts with -vm you should add it before
the line starting with -vmargs
to have enough memory to run Rascal please
set the stacksize using the command line arguments of eclipse -vmargs -Xss8m,
or you might set this in the eclipse.ini file.
find the line that starts with -vmargs and add on a separate line -Xss8m

Spring STS 3.7.2 "No Java virtual Machine Found" on Mac OS X Yosemite

I have been using Spring STS 3.7.2 for a few months on my Mac laptop (Mac OS X Yosemite 10.10.5). But suddenly the STS IDE is not starting up. I suspect that one of the automatic OS update may have changed something, since I noticed that I don't see java any more on my path setting.
I manually added the following entries to my .bash_profile and updated using source command:
export PATH=$PATH:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/bin
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
But STS stubbornly not working. It keeps giving me the error message in a dialog box:
A java runtime environment (JRE) or Java development kit (JDK) must
be available in order to run STS. No Java virtual machine was found
after searching ....
I am confused. I am able to invoke java from any terminal window, as well as JAVA_HOME environment variable is set.
Any ideas what may be going on?
After quite a bit of searching online, I figured out the problem, and resolved it for myself. It basically boils down to JDK upgrade to versions beyond 1.6.
The following link provided a solution:
https://apple.stackexchange.com/questions/178647/jdk-platform-not-recognized-running-eclipse-or-mvn
Here are the steps:
Revert back to JDK 1.6: Download and install JDK 1.6 from this Apple site: https://support.apple.com/kb/DL1572?locale=en_US
Change the PATH variable to point to the 'bin' directory of where JDK is installed. On my Mac, it was installed at: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin
Go to the STS application installed directory and run the command "open -a STS.app". This will open the STS IDE successfully.
Exit STS.
Now, if you want to use Java 8, then change the PATH variable to the Java 8 directory. On my Mac, it was at: /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin
Launch the STS app again, and voila!, the problem solved.

Eclipse 4.2 Juno doesn't find JRE

I downloaded Eclipse Juno and I am trying to run it for the first time. System is Win 7 Home Premium and I also downloaded JDK. I am getting the following error:
A Java Runtime 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: C:\Program
Files\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH
The javaw.exe file it needs is in...
C:\Program Files\Java\jre7\bin\javaw.exe
How do I fix this problem? Thanks in advance
" A Java Runtime 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: C:\Program Files\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH "
You need to install Java JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
and then edit your path location:
Right-click on computer->properties->advanced system settings->advanced->environment variables:
Add C:\Program Files\Java\<JDK version>\bin to your PATH variable.
Also add JAVA_HOME as a system variable. I have my JAVA_HOME set to C:\Program Files\Java\jdk1.7.0_03.
When you are done, start cmd, type java, and hit enter. If you get an error that it can not be found then java is not correctly installed.
You just need to have a Java environment installed in one of the locations Eclipse looks. For Eclipse you do NOT need the full JDK.
It is enough to install a Java Runtime Environment, e.g. from java.com. This still allows you to develop against any JDK - this is just about the JVM that Eclipse needs for itself.

Eclipse JRE or JDK missing

I am trying to use Eclipse on a friends computer but we keep getting this when we run Eclipse
We have the environmental variable set as well.
Edit
it was working before he installed the black berry plug in.
The variable JAVA_HOME is not required by Eclipse. If your Java installation does not put the Java executables in the PATH, you should add those manually.
A faster way to have your Eclipse up and running consists in modifying the eclipse.ini and using the -vm option.
http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Windows_Example
I had the same problem. For me, I needed the JDK. So I had to install the JDK. It should match the build platform that is, 64bit vs. 32bit windows. After that, I removed, the -vm line from the eclipse.ini file (the suggested fix). It was giving me the "Can't create virtual machine" error. The current release of JDK is version, 7 whereas the Android Developers Toolkit version of eclipse is currently based on JDK 6. But it seems to work. Eclipse came up and is functional. Haven't actually written a program yet.
Go to eclipse folder (where eclipse is installed) and open eclipse.ini file in your editor and add the following code after openFile tag.
-vm C:\Program Files\JDK6\bin\javaw.exe
That's all.
I had a similar problem, since our Java and JDK is consistently updated by our service desk, including uninstalling old JDKs. They take care of the PATH for us, but then the JRE that Eclipse was used to "seeing" was gone. So, the thing that has worked best for me is to modify the shortcut's "target" from:
"C:\Program Files\Eclipse\Eclipse IDE for Java EE Developers\eclipse.exe"
to
"C:\Program Files\Eclipse\Eclipse IDE for Java EE Developers\eclipse.exe" -vm "C:\Program Files\Java\<jdkver>\jre\bin\javaw.exe"
That will point Eclipse toward to the JRE in the JDK you want it to use, and then you can update that shortcut when your JDK updates.
This is on Windows 64bit, obviously.
It can also happen on mismatch of JAVA and Eclipse bit version.
for eg:
If in your System java is 32 bit and you are trying to install Eclipse of 64 bit then the same situation might occur.
Because Eclipse will look Java in Program Files while at the same time Java may be present in Program Files (x86).
So in this case eclipse will not get java and throw the same error.
While installing eclipse, Jre missing :
I solved my error as follows:-
This error may comes if you have 2 program files folder in your system.
"Program files" &
"Program files x86".
Please install JDK&JRE in the "Program files" folder.
Hope your jre missing error get solved.
this works for me:
open eclipse.ini file in your editor and add the line: -vm C:\Program Files\JDK11\bin\javaw.exe
update system PATH with correct JDK path.