[java] Setting up Eclipse with JRE Path

I have downloaded and extracted Eclipse. I have Eclipse in the following directory: C:\Applications\eclipse. When I try and run the executable , I get the following message :

NO JRE in System PATH

I currently have the following folder:

C:\Program Files (x86)\Java\jre7

Do I need to set up some environment variables for my Windows 7 OS to get Eclipse to run ? If so , may I please have some help to do this ? If not , can I please have some help to get Eclipse to run .

EDIT

I have changed the shortcut to include the path to the Virtual Machine , and am now getting this error :

http://www.canning.co.nz/Eclipse/Eclipse_Message2.png

This question is related to java eclipse path environment

The answer is


If you are using windows 8 or later:

  1. download and install the jdk or jre with all the default settings and options.
  2. Then download and install eclipse.

Everything should work fine. I don't know if it works exactly the same for other OS, but you don't have to set the PATH manually in Windows 8 or later.


You can add this line to eclipse.ini :

-vm 
D:/work/Java/jdk1.6.0_13/bin/javaw.exe  <-- change to your JDK actual path
-vmargs <-- needs to be after -vm <path>

But it's worth setting JAVA_HOME and JRE_HOME anyway because it may not work as if the path environment points to a different java version.

Because the next one to complain will be Maven, etc.


I just copied the jre folder to whatever path the message tells me it was missing at, and solved it.

(after editing the JAVA_HOME and editing the eclipse.ini didn't worked (as i probably did something wrong)) (i have no other java applications running so it's not affecting me)


Java version used : 1.8 IDE : Eclipse Neon

Adding like the below didn't work for me

-vm [relative java home]/jdk1.8.0_21/bin/javaw.exe

and then when i removed

javaw.exe

it worked, so it will be like

-vm [relative java home]/jdk1.8.0_21/bin/


Add this to eclipse.ini:

-vm
your_java_path\bin\javaw.exe

...but be aware that you must add these lines before -vmargs


This may sound dumb, but it may be a fresh, or damaged install, so is the JDK installed? If not, go to the download site and download the latest version of Java JRE. Like I said, this may sound dumb, but it solved my problem.

http://www.oracle.com/technetwork/java/javase/downloads/index.html


I have several version of JDK (not JRE) instaled and I launch Eclipse with:

C:\eclipse\eclipse.exe -vm "%JAVA_HOME%\bin\javaw.exe" -data f:\dev\java\2013

As you can see, I set JAVA_HOME to point to the version of JDK I want to use.

I NEVER add javaw.exe in the PATH.

-data is used to choose a workspace for a particular job/client/context.


You should specify where Eclipse should find your JDK in the file eclipse.ini. Specifically, the following parameter (note that it is 2 separate lines in the ini file):

-vm
C:\Java\JDK\1.8\bin\javaw.exe

or wherever your javaw.exe happens to be.

Note: The format of the ini file is very particular; make sure to consult https://wiki.eclipse.org/Eclipse.ini to ensure you get it exactly right


You are most probably missing PATH entries in your windows. Follow this instruction : How do I set or change the PATH system variable?


I had the same issue caused by two things:

  1. I had downloaded a 32bit Java version instead of 64bit.
  2. The eclipse.ini did not have path to javaw.exe, so as per prior posts added the statement which points to the location java.

So after I uninstalled the 32 bit Java 1.7, installed the correct one and added the javaw.exe path, eclipse fired up with no more errors


Add the following to the eclipse.ini :

-vm


Java_Home_Variable\bin\javaw.exe

In my Case its

-vm

H:\usr\java\jdk1.6.0_16\bin\javaw.exe

Add the following -vm D:/Java/jdk1.6.0_30/bin/javaw.exe in the begin of eclipse.ini like this :

-vm
  D:/Java/jdk1.6.0_30/bin/javaw.exe
  -startup
  plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
  --launcher.library
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835
  -product
   org.eclipse.epp.package.jee.product
   --launcher.defaultAction
   openFile
   --launcher.XXMaxPermSize
   1024M
   -showsplash
   org.eclipse.platform
    --launcher.XXMaxPermSize
   1024m
    --launcher.defaultAction
   openFile
   --launcher.appendVmargs
   -vmargs
   -Dosgi.requiredJavaVersion=1.6
   -Xms1024m
   -Xmx2048m

Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to path

Get Path from another app (WhatsApp) How to serve up images in Angular2? How to create multiple output paths in Webpack config Setting the correct PATH for Eclipse How to change the Jupyter start-up folder Setting up enviromental variables in Windows 10 to use java and javac How do I edit $PATH (.bash_profile) on OSX? Can't find SDK folder inside Android studio path, and SDK manager not opening Get the directory from a file path in java (android) Graphviz's executables are not found (Python 3.4)

Examples related to environment

Using Pip to install packages to Anaconda Environment How to generate .env file for laravel? Set windows environment variables with a batch file Setting up Eclipse with JRE Path Changing default shell in Linux How to find the path of the local git repository when I am possibly in a subdirectory Windows 7 environment variable not working in path Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'? Java system properties and environment variables Environment variables in Eclipse