Clarify documentation to explicitly state that vmargs in eclipse.ini is ignored

Bug #83779 reported by TJ on 2007-02-07
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eclipse (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: eclipse

Using Edgy with Eclipse 3.2.1 and Sun JVM 1.5.0_08-b03

vmargs specified in "/usr/lib/eclipse/eclipse.ini" are ignored when starting Eclipse using the shell script "/usr/bin/eclipse", although "inotifywait -m /usr/lib/eclipse/eclipse.ini" shows that eclipse.ini is opened during start-up.

vmargs in "/usr/lib/eclipse/eclipse.ini" are used when starting Eclipse from its launcher "/usr/lib/eclipse/eclipse". "inotifywait" verifies the same file operations are performed on eclipse.ini as in the non-working case.

JVM version is the same in both cases:

$ /usr/bin/java -version
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Server VM (build 1.5.0_08-b03, mixed mode)

$ /usr/lib/jvm/java-1.5.0-sun/bin/java -version
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Server VM (build 1.5.0_08-b03, mixed mode)

Here are the complete command lines from each method of starting Eclipse. They were collected using "ps -efly | grep eclipse" and then cleaned up to show one parameter per line:

Eclipse started via script "/usr/bin/eclipse":

/usr/lib/jvm/java-1.5.0-sun/bin/java
-Djava.library.path=/usr/lib/jni
-Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.1/classmap.db
-Dgnu.gcj.runtime.VMClassLoader.library_control=never
-Dosgi.locking=none
-jar /usr/lib/eclipse/startup.jar
-os linux
-ws gtk
-arch x86
-launcher /usr/lib/eclipse/eclipse
-name Eclipse
-showsplash 600
-exitdata 1178016
-install /usr/lib/eclipse
-vm /usr/lib/jvm/java-1.5.0-sun/bin/java
-vmargs
 -Djava.library.path=/usr/lib/jni
 -Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.1/classmap.db
 -Dgnu.gcj.runtime.VMClassLoader.library_control=never
 -Dosgi.locking=none
-jar /usr/lib/eclipse/startup.jar

Eclipse started via launcher "/usr/lib/eclipse/eclipse":

/usr/bin/java
-Xms40m
-Xmx512m
-jar /usr/lib/eclipse/./startup.jar
-os linux
-ws gtk
-arch x86
-launcher /usr/lib/eclipse/./eclipse
-name Eclipse
-showsplash 600
-exitdata 11a8016
-vm /usr/bin/java
-vmargs
 -Xms40m
 -Xmx512m
-jar /usr/lib/eclipse/./startup.jar

TJ (tj) on 2007-02-07
description: updated
TJ (tj) wrote :

According to "The Eclipse Program Launcher"

http://www.eclipse.org/swt/launcher.html

"In general, the settings of the config file are expected to be overriden by the command line.

    * the -vmargs from the command line replaces in its entirety the -vmargs from the config file."

So this isn't a *bug* as such, but it is certainly behaviour likely to confuse end-users because it isn't clearly documented up-front in the Ubuntu "eclipse" package notices.

Most Eclipse users are going to expect the Eclipse documentation to be the place to look, and not pick-up easily on this over-ride ramification.

According to the Debian "man eclipse" the file "/home/<user>/.eclipse/eclipserc" should be used but there is no indication of *what* to put in it.

From reading "/usr/bin/eclipse" where it includes the file as a shell script it seems the file should contain bash shell statements, for example:

VMARGS="-Xms40m -Xmx512m"

This should be clearly documented in the man-pages, and also up front in the eclipse package installer notes, not least because many developers are needing to increase the heap and Permanent Generation (PermGen) memory settings to cope with the number of class definitions loaded by the Eclipse environment. E.g:

VMARGS="-Xms40m -Xmx512m -XX:PermSize=128M -XX:MaxPermSize=256M"

and may believe that adding these values to eclipse.ini has dealt with the issue.

Rebecca Blyth (rebecca-blyth) wrote :

This one's just caught me out. I've always installed Eclipse manually before, and couldn't work out why Ubuntu's version didn't seem to be using the heap size settings I was telling it to use in eclipse.ini

This explains it!

A simpler solution to get eclipse to behave as it does when you install it manually is just to edit the launcher to run /usr/lib/eclipse/eclipse instead of /usr/bin/eclipse. Or you could set up a sym link to it from /usr/bin to avoid having to type so much if you like to launch eclipse from a shell.

Joachim R. (jro) wrote :

This is a bug because :
 - eclipse.ini is used on Windows
 - if eclipse.ini is useless with Ubuntu, remove it !
see https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/210319

Daniel T Chen (crimsun) on 2008-09-20
Changed in eclipse:
status: New → Confirmed
hackel (hackel) wrote :

It seems to me that, unless a ~/.eclipse/eclipserc exists, eclipse should be run normally (and eclipse.ini should be parsed). What we really need, is the possibility to customize the eclipse.ini in e.g. /etc/eclipse/eclipse.ini and ~/.eclipse/eclipse.ini so that stupid users don't go editing files in /usr/lib when they shouldn't be. If this doesn't exist already, then the bug should be forwarded upstream. There's no reason for Debian to re-invent the wheel on this one, even if the current eclipse.ini format is horrible!

Benjamin Drung (bdrung) wrote :

The eclipse.ini files is used again since version 3.5.1-0ubuntu1. Therefore I close this bug report.

Changed in eclipse (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers