Eclipse Java 1.7

  • Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help

Make sure your Java Project is configured probably to use Java 1.7. Right click your project Properties Java Compiler and set “ Compiler compliance level ” to 1.7. Step2: Java Build Path. And change it to “Java 7” Step3: Next from the menu on the left select Project Facets Java and set its version to 1.7. In Eclipse, I am getting an error: Build path specifies execution environment Java SE 1.7. There are no JREs installed in the workspace that are strictly compatible with this environment.

  • Toolbox
  • Page information
  • Permanent link
  • Printable version
  • Special pages
  • Related changes
  • What links here
  • 2Specifying the JVM
    • 2.3-vm value: macOS Example

Eclipse startup is controlled by the options in $ECLIPSE_HOME/eclipse.ini. If $ECLIPSE_HOME is not defined, the default eclipse.ini in your Eclipse installation directory (or in the case of Mac, the Eclipse.app/Contents/MacOS directory) is used.

eclipse.ini is a text file containing command-line options that are added to the command line used when Eclipse is started up. There are many options available, please see here.

Important:

  1. You can, and should, experiment with changes to the launch command from your Command Prompt/Terminal before changing the eclipse.ini itself.
  2. Each option and each argument to an option must be on its own line.
  3. All lines after -vmargs are passed as arguments to the JVM, so all arguments and options for eclipse must be specified before -vmargs (just like when you use arguments on the command-line)
  4. Any use of -vmargs on the command-line replaces all -vmargs settings in the .ini file unless --launcher.appendVmargs is specified either in the .ini file or on the command-line. (doc)
  5. -XX VM arguments are subject to change without notice, even during minor updates. If the JVM keeps exiting with code 2 instead of starting Eclipse, try removing them.
  6. Make a backup--keep a copy of the original contents on hand so you don't break your installation and have to download it all again.


By default, eclipse.ini looks something like this (the exact contents will vary based on operating system and which Eclipse package you have):

Among other things, this sets the heap space to 40MB initially and a maximum of 512MB, and also specifies a maximum PermGen size of 256MB. A max heap of 512MB might be OK for some users, but it's often necessary to bump that value up for large project sets or when some third-party plugins are installed.

One of the most recommended options to use is to specify a specific JVM for Eclipse to run on. Doing this ensures that you are absolutely certain which JVM Eclipse will run in and insulates you from system changes that can alter the 'default' JVM for your system. Many a user has been tripped up because they thought they knew what JVM would be used by default, but they thought wrong. eclipse.ini lets you be CERTAIN.

The following examples of eclipse.ini demonstrate correct usage of the -vm option.

Note the format of the -vm option - it is important to be exact:

  • The -vm option and its value (the path) must be on separate lines.

TODO: I know this next statement is not completely true, I just don't know the exact answer. A path ending in 'bin', pointing to the 'bin' directory of the Java distro works, and Ed Merks tells me that pointing to a 'shared library' works also.

  • The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
  • The -vm option must occur after the other Eclipse-specific options (such as -product, --launcher.*, etc), but before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
  • For the 32-bit Eclipse executable (eclipse.exe on Windows) a 32-bit JVM must be used and for the 64-bit Eclipse executable a 64-bit JVM must be used. 32-bit Eclipse will not work with a 64-bit JVM.

Here is an example of what eclipse.inimight look like on a Windows system after you've added the -vm argument and increased the maximum heap space:

Remember that the exact values will differ slightly depending on operating system and Eclipse package.

-vm value: Windows Example

This is how the -vm argument might look on Windows (your exact path to javaw.exe could be different, of course. Please beware of paths that contain a space, the examples below do not have any spaces, and using quotation marks around paths that contain spaces does not seem to work):

Or

An alternative way is to insert the following VM option before the -vmargs option in the Eclipse shortcut's properties (edit the field Target inside the 'Shortcut' tab):

or

This might not work on all systems. If you encounter 'Java was started but returned exit code=1' error while starting the eclipse, modify the -vm argument to point to jvm.dll (exact path could be different):

-vm value: Linux Example

This is how the -vm argument might look on Linux (your exact path to java could be different, of course):

-vm value: macOS Example

On a macOS system, you can find eclipse.ini by right-clicking (or Ctrl+click) on the Eclipse executable in Finder, choose Show Package Contents, and then locate eclipse.ini in the Eclipse folder under Contents. The path is often:/Applications/Eclipse.app/Contents/Eclipse/eclipse.ini

For versions of Mac OS X 10.7+ is something like:

For example, the latest JDK 1.8 (as of July 2015) is/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin

For standard Mac Java installations and so you don't have to continually update the setting when you install new Java VMs, set the -vm flag to simply /usr/bin:

If you want to use another JDK (that has the macOS directory layout, like the .tar.gz from AdoptOpenJDK) you should use:

For JDKs without macOS directory layout see: Using a JDK without macOS directory layout

NOTE: Occasionally, depending on the version of your macOS and whether or not you had already run this particular Eclipse installation before, upon launch after changing the -vm, you may run into an error that says 'the application is damaged and can't be opened'. This is the expected behavior since you just modified a signed/notarized app. This problem can be overcome by opening the Eclipse application once before changing the eclipse.ini file. Alternatively, running of the following command can fix the issue too: xattr -cr Eclipse.app

Here is additional information:

Perhaps the best way to determine the location for the JDK you want to use is with the utility

From the list produced by that command, select the JDK you want to use and put that path into the eclipse.ini file, making sure to append /bin/java to the path (eg, /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/java

Note that the full path can either include java or not. For example, the following will both work:


Use a Jiffy Lube coupon from us to change your oil, fix your brakes, test your battery, and more. From discounted tire rotation to special deals on check-ups, you can rake in the savings as you drive off into the sunset with Jiffy Lube in the passenger seat. Groupon jiffy lube oil change coupon.

Using a JDK without macOS directory layout

If you want to use a JDK that doesn't follow the macOS directory layout, like the ones installed through SDKMAN!, then you need to specify the path to the libjli.dylib file.

For JDK 11+: <JDK_11+_HOME>/lib/jli/libjli.dylib

For JDK 8: <JDK_8_HOME>/jre/lib/jli/libjli.dylib


Examples using SDKMAN!

JDK 11+

JDK 8

NOTE: Beware that if you use current instead of using a specific JDK version identifier it will use the default if you launch the Eclipse.app using the UI (double-click or using Spotlight). If you launch it from a terminal it will use the one currently selected.


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.
Retrieved from 'https://wiki.eclipse.org/index.php?title=Eclipse.ini&oldid=441994'
  • Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
  • Toolbox
  • Page information
  • Permanent link
  • Printable version
  • Special pages
  • Related changes
  • What links here

Installing Eclipse is relatively easy, but does involve a few steps and software from at least two different sources. Eclipse is a Java-based application and, as such, requires a Java Runtime Environment or Java Development Kit (JRE or JDK) in order to run.

Note that on recent versions of Mac, a full JDK needs to be installed, not just a JRE; see instructions below.

Install a JVM

The latest release of Eclipse requires a 64-bit JVM, and does not support a 32-bit JVM.


Current releases of Eclipse require Java 11 JRE/JDK or newer.


If you are using Eclipse to do Java development, or are on macOS, install a JDK.In all cases, Eclipse requires a 64-bit JVM

A Java Development Kit (JDK) includes many useful extras for Java developers including the source code for the standard Java libraries.


Regardless of your operating system, you will need to install some Java virtual machine (JVM). You may either install a Java Runtime Environment (JRE), or a Java Development Kit (JDK), depending on what you want to do with Eclipse. If you intend to use Eclipse for Java development, then you should install a JDK. If you aren't planning to use Eclipse for Java development and want to save some disk space, install a JRE.

  • If you're using Windows, you may already have a JRE installed, but upgrading usually won't hurt.
  • If you're using Mac, and you don't have a JDK installed, you may get a bogus message from the OS stating that you should 'install the legacy Java SE 6 runtime'. Installing that will not solve the problem, because recent versions of Eclipse require a higher version. If you install just a JRE, and not a full JDK, that error message will persist. You must install a full JDK.
  • If using Linux, read this
    • GCJ will NOT work.

Eclipse 4.19 (2021-03)

Eclipse 4.19 (2021-03) was released on March 17, 2021. It is the supported release.

A Java 11 or newer JRE/JDK is required, LTS release are preferred to run all Eclipse 2021-03 packages based on Eclipse 4.19, with certain packages choosing to provide one by default. The Installer now includes a JRE. Consider using the Installer. Please see 5 Steps to Install Eclipse.

Eclipse 4.18 (2020-12)

Eclipse 4.18 (2020-12) was released on December 16, 2020.

A Java 11 or newer JRE/JDK is required, LTS release are preferred to run all Eclipse 2020-12 packages based on Eclipse 4.18, with certain packages choosing to provide one by default. The Installer now includes a JRE. Consider using the Installer. Please see 5 Steps to Install Eclipse.

Eclipse 4.17 (2020-09)

Eclipse 4.17 (2020-09) was released on September 16, 2020.

Consider using the Installer. Please see 5 Steps to Install Eclipse.

A Java 11 or newer JRE/JDK is required, LTS release are preferred to run all Eclipse 2020-09 packages based on Eclipse 4.17, as well as the Installer.

Eclipse 4.16 (2020-06)

Eclipse 4.16 (2020-06) was released on June 17, 2020.

Consider using the Installer. Please see 5 Steps to Install Eclipse.

A Java 8 or newer JRE/JDK is required, LTS release are preferred to run all Eclipse 2020-06 packages based on Eclipse 4.16, as well as the Installer.

Eclipse 4.15 (2020-03)

Eclipse 4.15 (2020-03) was released on March 18, 2020.

A Java 8 or newer JRE/JDK is required, LTS release are preferred to run all Eclipse 2020-03 packages based on Eclipse 4.15, as well as the Installer.

Eclipse 4.14 (2019-12)

Eclipse 4.14 (2019-12) was released on December 18, 2019. See Eclipse 2019-12 schedule.

Eclipse Java 1.7.0 (64 Bit)

Consider using the Installer. Please see 5 Steps to Install Eclipse.

A Java 8 or newer JRE/JDK is required to run all Eclipse 2019-09 packages based on Eclipse 4.14, as well as the Installer.

Eclipse 4.13 (2019-09)

Eclipse 4.13 (2019-09) was released on September 18, 2019. See Eclipse 2019-09 schedule.

Consider using the Installer. Please see 5 Steps to Install Eclipse.

A Java 8 or newer JRE/JDK is required to run all Eclipse 2019-09 packages based on Eclipse 4.13, as well as the Installer.

Eclipse 4.12 (2019-06)

Eclipse 4.12 (2019-06) was released on June 19, 2019. See Eclipse 2019-06 schedule.

Consider using the Installer. Please see 5 Steps to Install Eclipse.

A Java 8 or newer JRE/JDK is required to run all Eclipse 2019-03 packages based on Eclipse 4.12, as well as the Installer.

Eclipse 4.11 (2019-03)

Eclipse 4.11 (2019-03) was released on March 20, 2019. See Eclipse 2019-03 schedule.

Consider using the Installer. Please see 5 Steps to Install Eclipse.

A Java 8 or newer JRE/JDK is required to run all Eclipse 2019-03 packages based on Eclipse 4.11, as well as the Installer.

Eclipse 4.10 (2018-12)

Eclipse 4.10 (2018-12) was released on December 20, 2018. It is the supported release. See Eclipse 2018-12 schedule.

Consider using the Installer. Please see 5 Steps to Install Eclipse.

A Java 8 or newer JRE/JDK is required to run all Eclipse 2018-12 packages based on Eclipse 4.10, including running the Installer. The reasoning behind requiring Java 8 are discussed here.

Eclipse 4.9 (2018-09)

Eclipse 4.9 (2018-09) was released on September 19, 2018. See Eclipse 2018-09 schedule.

A Java 8 or newer JRE/JDK is required to run all Eclipse 2018-09 packages based on Eclipse 4.9, including running the Installer. The reasoning behind requiring Java 8 are discussed here.

Eclipse 4.8 (Photon)

Eclipse 4.8 (Photon) was released on June 27, 2018. See Photon schedule.

A Java 8 or newer JRE/JDK is required to run all Oxygen packages based on Eclipse 4.7, including running the Installer. The reasoning behind requiring Java 8 are discussed here.

Eclipse 4.7 (Oxygen)

Eclipse 4.7 (Oxygen) was released on June 28, 2017. See Oxygen schedule.

A Java 8 or newer JRE/JDK is required to run all Oxygen packages based on Eclipse 4.7, including running the Installer. The reasoning behind requiring Java 8 are discussed here.

Eclipse 4.6 (Neon)

Eclipse 4.6 (Neon) was released on June 22, 2016. See Neon schedule.

A Java 8 JRE/JDK is required to run all Neon packages based on Eclipse 4.6, including the Installer. The reasoning behind requiring Java 8 are discussed here.

Eclipse 4.5 (Mars)

Eclipse Java 1.7

Eclipse 4.5 (Mars) was released on June 24, 2015.

A Java 7 JRE/JDK is required for all Mars package downloads based on Eclipse 4.5, including the Installer. Information concerning tested configurations for Eclipse 4.5 is provided here.

Eclipse 4.4 (Luna)

Eclipse 4.4 (Luna) was released on June 25, 2014.

A Java 7 JRE/JDK is required for most of the Luna package downloads based on Eclipse 4.4. Information concerning tested configurations for Eclipse 4.4 is provided here.

Eclipse 4.3 (Kepler)

Eclipse 4.3 (Kepler) was released in June 2013.

A Java 6 JRE/JDK is recommended for Eclipse 4.3. More information concerning tested configurations for Eclipse 4.3 is provided here.


JRE/JDK Sources

Eclipse Java 1.7

Be sure to install a JVM with the same bit level as Eclipse
i.e. install a 32-bit JRE to run 32-bit Eclipse; install a 64-bit JRE to run 64-bit Eclipse

There are several sources for a JRE/JDK. Here are some of the more common/popular ones (listed alphabetically):

Download Eclipse

Download Eclipse from the Eclipse Downloads Page.

There are several package choices. Note that you can install the features from any package into any other package. If you are, for example, planning to do mostly Java development and some C/C++ development, you should download the Eclipse IDE for Java Developers and then add the C/C++ development tools via the 'Help > Install New Software..' menu option.

The download will be delivered as a compressed (i.e. a '.zip', or '.tar.gz') file. Decompress this file into the directory of your choice (e.g. 'c:eclipse' on Windows) and ensure you have full Read and Execute permissions. You can optionally create a shortcut of the executable file ('eclipse.exe' on Windows, or 'eclipse' on Linux).

Note that there is a known problem with the built-in decompression utility on all current versions of Windows. We recommend that you use a more robust decompression utility such as the open source 7zip when decompressing an Eclipse download. Some people report success when initially decompressing Eclipse into a root directory (e.g. c:) and then moving it to a more appropriate home (e.g. c:Program FilesEclipse)

Configure Eclipse to use the JVM

Eclipse Java 1.7 Download

It is strongly recommended to configure Eclipse with the specific JVM that you want. See the instructions at Eclipse.iniThis is a very important step to be sure that Eclipse is using the JVM you intend and can't be influenced by any other software that might alter your system.The JVM used to launch Eclipse has no affect on whether it can compile Java sources for other Java language versions.

Extending Eclipse

Use the Help > Install new software.. menu option to add Kepler features to your Eclipse installation (you can, for example, use this option to add C/C++ development support). Additionally, you can tap into a vast collection of extensions provided by the Eclipse community and ecosystem via the Eclipse Marketplace Client (Help > Eclipse Marketplace). Note that not all Eclipse packages contain the Eclipse Marketplace Client.

Troubleshooting

Java was started but returned exit code = 13

If you've 'installed' Eclipse but are having trouble getting it to run, the most likely cause is that you have not correctly specified the JVM for it to run under. You may need to edit the eclipse.ini file.

Another common mistake on Microsoft Windows is a mismatch between the 'bittedness' of Eclipse and the JVM/JDK. This is the most frequent cause of an Error 13. 64-bit Eclipse requires a 64-bit JVM, and 32-bit Eclipse requires 32-bit JVM--you can not mix-and-match between 32-bit and 64-bit, so make sure the version of Eclipse you installed matches the JVM/JDK that you're using to run it (and make sure you're using eclipse.ini to specify the exact JVM used to run Eclipse, described above).

As a simple test, open a Command Prompt window, move to the directory that is pointed to by the -vm argument in your eclipse.ini, and run the intended java.exe with the -d32 switch to test if it supports 32-bit, or -d64 to test for 64-bit support. It's often simplest to download a version of Eclipse that will work with whatever Java you already have installed.

To open 'Eclipse' you need to install the legacy Java SE 6 runtime

On more recent versions of the Mac, if you don't have a full JDK of an appropriately high version installed, the OS produces this bogus message. Installing any JRE will not eliminate this problem. A full JDK needs to be installed on the Mac.

Eclipse Java 1.7.10

Extraction requires a password or otherwise fails on Windows.

Eclipse downloads are not password protected. This is a known problem with the built-in decompression utility on all current versions of Windows. We recommend that you either download the installer or use a more robust decompression utility such as the open source 7zip when decompressing an Eclipse download. Some people report success when initially decompressing Eclipse into a root directory (e.g. c:) and then moving it to a more appropriate home (e.g. c:Program FilesEclipse)

Eclipse Java 1.7 Download

More information

Retrieved from 'https://wiki.eclipse.org/index.php?title=Eclipse/Installation&oldid=442664'