Eclipse (No JVM was found) - eclipse

Eclipse gave me an error specifying that no JRE is installed while I was trying to configure Erlide in eclipse.
I added path to erlang directory in 'System Variables'. Then I installed erlang plugin for eclipse, added erlang installation directory path in Eclipse preferences and restarted Eclipse.
After restarting eclipse started giving me error about JRE.

Below steps might help you to solve your problem.
Install JDK and JRE - Here are step by step Instructions OR ANOTHER
Verify you setup JAVA_HOME and JRE_HOME and PATH into environment variable.
You can also investigate your Java version via Command Prompt:
Open a Command Prompt (Navigate to “Start” => “Run” and type “cmd”)
Then enter the following command:
java –version
If you don't see your java version you have to follow step 1 carefully again
Installed eclipse/ if already installed open the same. Here are step by step Instructions
NOTE: Make sure that you have same bits for both JDK and EClipse (32 or 64). One way is to verify in your ini file.

To develop a Java program, you need a JDK not only a JRE.

Do you have a JDK installed? Have you tried to run jar, $ set | grep "JAVA_HOME" (Linux) or C:\> set | find "JAVA_HOME" (Windows) in your command prompt to see if you have Java configured in your machine?
Once you install your JDK you need to set this environment variable.

Maybe Earlide is not compatible with your JDK 1.8, can you try with jdk 1.6

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.

version 1.7 of the jvm is not suitable for this product. version 1.8 greater is required for eclipse nano in window

I am trying to launch Eclipse Nano in Windows 7, but getting the error:
Version 1.7 of the JVM is not suitable for this product. version 1.8 greater is required for Eclipse Nano in Windows
I already have Java 8 installed on the system
Simply download 1.8 JDK from Java SE Development Kit 8 Downloads install it, then copy the jre folder & paste it in:
"C:\Program Files (x86)\EclipseNeon\"
Then rename the folder to "jre", start the eclipse again it should work.
sudo /usr/sbin/update-alternatives --config java
and select the jvm 1.8
I faced the same issue (Windows 10). You need to set the "JAVA_HOME" system environment variable to point to JDK 8 folder and edit the "Path" system environment variable to have a new path to JRE 8's bin folder, this should be at the top of the list.
I too got the same error while installing
Possible reason for the error - The eclipse version, you are installing and the Java version should be of same bit, i.e. either 32 bit or 64 bit
Solution: I have downloaded both the java for 64 bit and 32 bit and installed, now my problem is gone.
Please let me know if it works for you.
When you download the latest eclipse, and extract it, you can find the folder named eclipse-installer with eclipse-inst file inside it. Instead of double-clicking it to start installation, just navigate to the folder in terminal and run ./eclipse-inst command. It does the entire installation for you. It worked for me and hope who also got the same problem(version 1.7 of the jvm is not suitable for this product. version 1.8 greater is required) gets solved. :)
On a Windows system I had the same problem.
Although I had only Java 1.8 installed, I found that I also had a 1.7 upgrade file installed too (which didn't get uninstalled automatically when I installed 1.8).
Uninstalling this upgrade file allowed me to install Eclipse IDE.
I had the same issue and I had a different solution to this problem.
Though I set the JAVA_HOME to 1.8 (Both through CMD and environment variables), the error was persisting.
So I opened CMD prompt, typed:
java - version
to find out 1.7 was the version my system was set to. Until then I had no clue from where it was fetching this version.
And then I changed it to 1.8 using this command:
set path=C:\.....eclipse\jdk1.8.0_141-b15\bin
AND IT WORKED!
Recheck if it is set to 1.8 with the same command:
java -version
You should be good to go now!
if it's a 64-bit Eclipse. You'll need to explicitly download and install the 64-bit Java 8 or later.
download it from here
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
tips for windows users
Version 1.7 of the JVM is not suitable for this product. version 1.8
greater is required
user get above error message because they had multiple jdk version or they do not have latest version of jdk installed , even if you install latest version of jdk and you if you have not removed old version of jdk like 1.7 you will get the above error message , so better to get rid of old version of jdk and jre etc.
-> ignore this step if you have insallted latest version of jdk already
download 32 or 64 bit latest jdk from : https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-> go to C:\Program Files\Java and look for old version of jdk , let say if you have 1.7 versions of jdk delete them so that you are left only with latest version , you can remove old versions of jre too here just by deleting.
-> next run eclipse you will not get v1.7 message
Find the JVM
If a JVM is installed in the eclipse/jre directory, Eclipse will use it; otherwise the launcher will consult the eclipse.ini file and the system path variable. Eclipse DOES NOT consult the JAVA_HOME environment variable.
To explicitly specify a JVM of your choice, you can use the -vm command line argument:
eclipse -vm c:\jre\bin\javaw.exe ''start Java by executing the specified java executable
eclipse -vm c:\jre\bin\client\jvm.dll ''start Java by loading the jvm in the eclipse process
Go to Eclipse directory, find and open eclipse.ini configuration file then modify below parameter to your desired version, it will work.
-Dosgi.requiredJavaVersion=1.8
It worked for me
Eclipse will consider the version that is mentioned in eclipse.ini file, this error
means that your installed java version (in environment variable) and the mentioned java
version in eclipse.ini file is not matching.
You may just change the java version there (it will be in eclipse-installation-dir).
Change the property as below:-
-Dosgi.requiredJavaVersion=
Updating below line in eclipse.ini worked for me
-Dosgi.requiredJavaVersion=1.8
Two things:
Check this question here as it's similar and has some good pointers Eclipse - no Java (JRE) / (JDK) ... no virtual machine
Also, get the latest JRE and JDK from Oracle vs from java.com http://www.oracle.com/technetwork/java/javase/downloads/index.html
Today I meet the same question. I download the file that named "eclipse-inst-linux64.tar.gz". When I open the eclipse, it shows "Version 1.7.0_121 of the JVM is not suitable for this product. Version: 1.8".Then execute
cd /usr/bin/
sudo ln -s /Your_JAVA_PATH /usr/bin/java
Then you can install eclipse.
Make sure java and eclipse versions are same(32bit or 64bit)
Try running eclipse-installer as administrator(this worked for me)
If you need to skip this step just simply change Required Version number, ex:
open with any text editor instalation path/AptanaStudio3.ini
and change
-Dosgi.requiredJavaVersion=1.8 to -Dosgi.requiredJavaVersion=1.7
This is just for skipping this step.
I had both 1.7 and 1.8 in path and 1.7 was on top and 1.8 below in Pah, so i moved 1.7 below 1.8, thats it it worked.
Go to Oracle's website and download the newest version of Java JDK. (https://www.oracle.com/java/technologies/javase-downloads.html)
Install the program on your computer.
Remove all old environment variables related to Oracle and Java.
Set the environment variables related to the new installation all the way to the bin folder. (include the bin folder in the environment variables section)

How to set JAVA_HOME in maven in Windows7 correctly

I am facing Issues in running MVN commands from command line though I am able to successfully run with eclipse.
> mvn -version
**Maven home:** D:\maven **Java version:** 1.7.0_45, vendor: Oracle Corporation
**Java home:** C:\Program Files (x86)\Java\jre7
etc etc.....
> echo %JAVA_HOME%
D:\ProgramFiles\Java\jdk1.7.0_25
User Variable Set JAVA_HOME to D:\ProgramFiles\Java\jdk1.7.0_25; and path to D:\ProgramFiles\Java\jdk1.7.0_25\bin.
I have already JDK 1.6 installed in default drive C below. C:\Program Files (x86)\Java\jdk1.6.0_27,C:\Program Files (x86)\Java\jre7
As per project requirement, we needed JDK1.7 installed. Due to permission issues (not able to install C drive), I installed JDK 1.7 in path D:\ProgramFiles\Java\jdk1.7.0_25,D:\ProgramFiles\Java\jre7.
On Eclipse pointing to JDK1.7 for installed JREs. And able to run all MAVEN Commands via eclipse. But note, the library files for jre is still pointing to C drive lib jar files only and not D drive jar files.(But as eclipse is working good I ignored this!)
But from command line getting error as "Perhaps you are running on a JRE rather than a JDK". No compiler etc. on running any maven command. Also maven's JAVA_HOME is still pointing to jre of C drive on running mvn -version.
Please help how to correct my problem. (Without uninstalling older version of Java As i dnt have permission to C drive folder)
Thanks in advance for help. :)

problem running eclipse on ubuntu?

I downloaded eclipse on ubuntu. But when I run it it show 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:
/home/awan/eclipse/jre/bin/java
java in your current PATH
Can someone help me to solve this. I don't have experience about this on ubuntu.
thanks
You need to install either the openjdk-7-jre or oracle-java7-jre package.
sudo apt-get install openjdk-7-jre
Note that openjdk-7-jre is easier to install, because it's available via the standard Ubuntu repository, whereas you have to build oracle-java7-jre yourself using java-package.
If you allready installed java** you need to add the Java-Path to your eclipse.ini
in my case it's located at:
/usr/lib/eclipse/eclipse.ini
there you need to add direct under the "openFile" statement, where you replace the path with your java path:
-vm
/usr/lib/jvm/java-7-openjdk/bin/java //!replace with your path to java!
** check wether java is installed by typing the commands
java -version
or
javac -version
If you are sure that java is installed, but it's not found you may have multiple versions installed, check that by:
sudo update-alternatives --config java
and select installation first
I solved it by created a symbolic link java in /usr/bin that points to the VM.
Steps :
Downloaded the appropriate version of Oracle's JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=otnjp
extract it to any folder. For example :
tar zxvf ~/Downloads/jdk-8u5-linux-x64.tar.gz ~/DEV
create symbolic link with name java :
cd /usr/bin
ln -s ~/DEV/jdk1.8.0_05/bin/java java
You need to add the JDK to your PATH.
This link should help you get started.
You need to install the JDK or OpenJDK (Eclipse only officially supports the former, but the latter mostly works).
I solved this error message by adding jre path in to eclipse.ini.To solve the error like this,your machine should have java installed.
In my setup eclipse.ini is in
eclipse-jee-mars-linux-gtk-x86_64-5.0.0/eclipse folder.
Add,
-vm /home/user/Documents/Softwares/jdk-8u202-linux-x64/jdk1.8.0_202/jre/bin
at the top of the file.
In here /home/user/Documents/Softwares/jdk-8u202-linux-x64/jdk1.8.0_202 is my JAVA_HOME
For me, directing JDK path to -vm didn't work.I had to put the jre/bin path which is inside jdk folder.
You need to have a Java environment that can execute the Java instructions in Eclipse for it to run.
Install a suitable Java package in the package manager, and try again. Note that Eclipse does not require a JDK, a JRE is enough.
I tried editing .profile, .bashrc, to no avail. (I'm trying to use eclipse by clicking an icon, NOT by executing it from a bash shell).
SOLUTION: I copied my /home/denise/jdk1.7.0_25/jre to
/home/denise/dev//jre
which is a stupid solution because it defeats the purpose of having a .profile or .bashrc.
and no, there was no .pam_environment file
peace!
I had similar problem. It solved after, I have download JRE from http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
and put it in the path of eclipse as shown below -
abc#ubuntu:~/Downloads/eclipse$ ls
about_files
configuration
eclipse.ini
icon.xpm
p2
about.html
dropins
epl-v10.html
jre
plugins
artifacts.xml
eclipse
features
notice.html
readme
I hope it helps.
First of all you need to set your JAVA path in .bashrc file.
goto cd ~
open .bashrc,vi .bashrc
add a line at the end export path="path/to dir:$path"
do source .bashrc for changes to take effect.
Then open your eclipse.ini file(if you want to locate eclipse.ini do whereis eclipse).
open eclipse.ini,then add a line
-vm
"path/to/bin/of/open-jdk"
Just copy jre and paste in eclipse folder that's it. After this just click on eclipse icon to launch eclipse. Thanks.
artifacts.xml
configuration
dropins
eclipse
eclipse.ini
features
icon.xpm
jre
p2
plugins
readme

Programmatically configure Eclipse Installed JREs

I want to configure my Eclipse environment to use the JDK instead of the standard JRE. I'm doing this because I use m2eclipse, which requires tools.jar from the JDK to run.
I'm running Eclipse 3.5.1 on Windows 7 32-bit with JDK 1.6.0_16.
On my system, I have the JDK installed to "C:\Program Files\Java\jdk" (symlink to the latest install).
I add the -vm option to eclipse.ini to point to the JDK
-vm
C:/Program Files/Java/jdk/bin
I've confirmed that eclipse is in fact starting with the desired JVM. In the configuration details
eclipse.vm=c:/Program Files/Java/jdk/bin\..\jre\bin\client\jvm.dll
Additionally, in my environment,
JAVA_HOME=c:\Program Files\Java\jdk
However, in Window | Preferences | Java | Installed JREs, the only JRE listed is the one in "C:\Program Files\Java\jre6". This JRE ends up being the one under which Maven is run, and so my maven builds fail.
I know I can manually change the Installed JRE to point to the JDK, and this is what I've done in the past. However, I'd like to find a way to script this change so that I can automate the installation of a dev environment.
Where is this setting stored? What is the best way to automatically configure Eclipse to use the JDK as the only Installed JRE?
The setting is stored in
<workspace>\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.launching.prefs
I would recommend setting your JDK manually in Preferences / Java / Installed JRE, as well as Preferences / Java / Installed JRE / Execution Environment.
Then, whenever you need an eclipse with that exact configuration, just copy over this file with your preset config file, and launch that eclipse.
Extract from that config file:
org.eclipse.jdt.launching.PREF_DEFAULT_ENVIRONMENTS_XML=
<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>
<defaultEnvironments>
<defaultEnvironment environmentId\="JavaSE-1.6"
vmId\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1255369536255"/>
</defaultEnvironments>
eclipse.preferences.version=1
org.eclipse.jdt.launching.PREF_VM_XML=
<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>
<vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1255369536255">
<vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">
<vm id\="1255369536255"
javadocURL\="http\://java.sun.com/javase/6/docs/api/"
name\="jdk1.6.0_16" path\="C\:\\Prog\\Java\\jdk1.6.0_16">
<libraryLocations>
<libraryLocation jreJar\="C\:/Prog/Java/jdk1.6.0_16/jre/lib/resources.jar"
jreJavadoc\="http\://java.sun.com/javase/6/docs/api/"
jreSrc\="C\:/Prog/Java/jdk1.6.0_16/src.zip"
pkgRoot\=""/>