Error starting Eclipse: JRE / JDK must be available

Loaded the latest eclipse for Java EE Open ... error .. opening ... JRE / JDK must be available to run eclipse .. Unlike usual, my Java is installed in G: / Do I have to make any changes in ecplise.ini in the -vm tag? How to add java jdk bin path? Doesn't work anyway! Any idea?

0
java eclipse eclipse-indigo
Jun 13 '12 at 2:50
source share
2 answers

Eclipse looks for a PATH variable to choose which JRE to use, if configured, eclipse will work correctly, if you don’t have or want to point eclipse to a specific Java installation, you can specify the following argument in eclipse.ini

 -vm G:\Java 

You can see various runtime options here .

+4
Jun 13 2018-12-12T00:
source share

You can start Eclipse by running eclipse.exe on Windows or eclipse on other platforms. This small launcher essentially finds and loads the JVM. On Windows, the eclipsec.exe console executable can be used to improve command line behavior.

Alternatively, you can run Eclipse by directly invoking the JVM as follows:

java -jar eclipse / plugins / org.eclipse.equinox.launcher_1.0.0.v20070606.jar NOTE. The version of org.eclipse.equinox.launcher in the above command should match the version actually sent from Eclipse. For more information on starting Eclipse using Java (not eclipse.exe) using startup, see "Starting the Eclipse Command Prompt Using Equinox Launcher".

Find JVM

If the JVM is installed in the eclipse / jre directory, Eclipse will use it; otherwise, the launcher will access the eclipse.ini file and the system path variable. Eclipse does NOT process the JAVA_HOME environment variable.

To explicitly specify the JVM of your choice, you can use the -vm command line argument:

eclipse -vm c: \ jre \ bin \ javaw.exe '' start Java by running the specified java executable eclipse -vm c: \ jre \ bin \ client \ jvm.dll '' starts Java by loading jvm into the eclipse process More details For JVM job information, see the launch page.

eclipse.ini

The most recommended way to tell the JVM to run Eclipse is to include the launch configuration in the eclipse.ini file in the same folder as the Eclipse executable (eclipse.exe on Windows). The Eclipse launcher will read the arguments from the command line or configuration file called eclipse.ini. To specify the JVM using the configuration file, include the -vm argument in eclipse.ini, for example:

-vm with: /jre/bin/javaw.exe Note: there are no quotes in this path, which would be required when doing the same from the command line, this is the path to the space, etc. This is a common mistake when using Windows.

Eclipse now starts without additional arguments at the command line with the JVM specified in the eclipse.ini configuration file.

You should always use -vm to make sure which virtual machine you are using. Installers for other applications sometimes change the system path variable, thereby changing the virtual machine used to start Eclipse without knowing it.

The eclipse.ini file format is very specific; It is strongly recommended that you read eclipse.ini and follow the examples given there.

When Eclipse starts, you are prompted to choose a location for the workstation at startup. This behavior can be configured in the settings. You can manually specify the location of the workspace on the command line using the -data command line argument.

OLD: Launch Eclipse 3.2

In Eclipse 3.2 and earlier, an additional file appeared in the root of Eclipse: startup.jar. This jar file contains the classes needed to run the platform. In 3.3 and above, equivalent classes are in the package org.eclipse.equinox.launcher.

To start 3.2 by directly invoking the JVM, use the following command:

 java -cp eclipse/startup.jar org.eclipse.core.launcher.Main 

Eclipse 3.2 did not contain a console version of the executable.

OLD: Oracle / Sun VM 1.6.0_21 for Windows

Eclipse 3.3-3.6 for Windows launchers encountered a problem with Oracle / Sun Java VM version 1.6.0_21-b06.

UPDATE: Oracle / Sun released a replay of their JDK / JRE to fix this, so the recommended resolution to this problem is to download and reinstall version 1.6.0_21-b07 '. Make sure you have b07 or higher by running java -version.

Before the patch was released, there were three options for this:

1 ---- switch to "1.6.0_20" (as of July 19, 2010 it can be downloaded here) Change the command line to run or add the following line after "-vmargs" to the Eclipse.ini file: -XX: MaxPermSize = 256m (Detailed instructions / examples) http://wiki.eclipse.org/Eclipse.ini

2 ---- For 32-bit Helios, download the fixed eclipse_1308.dll file and place it in (eclipse_home) /plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 ( https: // bugs. eclipse.org/bugs/attachment.cgi?id=174640 )

{Java bug was closed for voting and comments in 6969236 on Java BugParade, because the change was canceled; The associated Eclipse bug report is open to vote and comment on bug 319514.}

+1
Aug 31 '13 at 4:40
source share



All Articles