Where Does Eclipse Look for Eclipse.Ini Under Linux

Where does Eclipse look for eclipse.ini under Linux

There is only one file.

lrwxrwxrwx 1 root root 16 Aug 8 2012 /usr/lib/eclipse/eclipse.ini -> /etc/eclipse.ini

Change .eclipse folder in Linux

The simplest thing to do is probably pass java a different user.home so that all the other myriad of places that derive a location base it off of user.home. So instead of what you have, use this in .ini file:

-Duser.home=/directory/other/here

In addition to .eclipse, you will probably find other directories created in your overridden user.home, such as .p2, .oracle_jre_usage, etc.

Other notes:

-Dosgi.configuration.area is the changes the configuration area for Eclipse, it does not effect user area. You also probably don't want to change that setting away from the default unless you really want multiple configurations (read more below).

Additionally, the normal thing to do would be to use -configuration as an argument to eclipse{.exe} and let eclipse convert it to the appropriate VM argument.

You probably want -user though to override the user area. Have a look at locations in the Eclipse help for more info (quoted below).

However, there are still things that have individual control over their location, such as secure storage, which is controlled by the -eclipse.keyring command line argument.

Locations

The Eclipse runtime defines a number of locations which give
plug-in developers context for reading/storing data and Eclipse users
a control over the scope of data sharing and visibility. Eclipse
defines the following notions of location:

User (-user) {osgi.user.area} [@none, @noDefault, @user.home,
@user.dir, filepath, url]

User locations are specific to, go figure,
users. Typically the user location is based on the value of the Java
user.home system property but this can be overridden. Information such
as user scoped preferences and login information may be found in the
user location.

Install (-install) {osgi.install.area} [@user.home,
@user.dir, filepath, url]

An install location is where Eclipse itself
is installed. In practice this location is the directory (typically
"eclipse") which is the parent of the eclipse.exe being run or the
plugins directory containing the org.eclipse.equinox.launcher bundle.
This location should be considered read-only to normal users as an
install may be shared by many users. It is possible to set the install
location and decouple eclipse.exe from the rest of Eclipse.

Configuration (-configuration) {osgi.configuration.area} [@none,
@noDefault, @user.home, @user.dir, filepath, url]

Configuration
locations contain files which identify and manage the (sub)set of an
install to run. As such, there may be many configurations per install.
Installs may come with a default configuration area but typical
startup scenarios involve the runtime attempting to find a more
writable configuration location.

Instance (-data) {osgi.instance.area}
[@none, @noDefault, @user.home, @user.dir, filepath, url]

Instance
locations contain user-defined data artifacts. For example, the
Resources plug-in uses the instance area as the workspace location and
thus the default home for projects. Other plugins are free to write
whatever files they like in this location.

While users can set any of
these locations, Eclipse will compute reasonable defaults if values
are not given. The most common usecase for setting location is the
instance area or, in the IDE context, the workspace. To run the
default Eclipse configuration on a specific data set you can specify:

eclipse -data c:\mydata

Java Path settings for Eclipse on Linux

I moved -vm and /usr/java/jdk1.8.0_121/bin/java lines in front of the -vmargs. So finally it looks like this:

-vm
/usr/java/jdk1.8.0_121/bin
-vmargs

So it worked.

Setting the correct PATH for Eclipse

Like Abob said:

Eclipse doesn't consult the JAVA_HOME variable

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.

Specific JDK in eclipse.ini for Eclipse IDE version 2020-09 use JDK 15, not default JDK what declared in system environment variable

-vm and C:\Program Files\Java\jdk-15\bin\javaw.exe have to be two lines directly before the line -vmargs, not after that line (see Eclipse wiki: eclipse.ini - Specifying the JVM):

-startup
plugins/org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar
--launcher.library
C:\Users\donhuvy\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1300.v20200819-0940
-product
org.eclipse.epp.package.jee.product
-showsplash
C:\Users\donhuvy\.p2\pool\plugins\org.eclipse.epp.package.common_4.17.0.20200910-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:\Program Files\Java\jdk-15\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=11
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/


Related Topics



Leave a reply



Submit