Home » Eclipse Projects » Eclipse Platform » eclipse.ini is the most sensitive, undocumented ini ever? plz help...
eclipse.ini is the most sensitive, undocumented ini ever? plz help... [message #301459] |
Fri, 31 March 2006 07:39 |
No real name Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hi all,
As you can read in the topic, im pretty confused by the way the ini
works...
There are 3 things i need in the ini:
1) -vmargs-Xms256m-Xmx1024m
2) -name eFlex Portfolio Eclipse
3) -vm d:\bea81sp5\jdk142_08\bin\javaw.exe
In the beginning i just put those lines in the ini and expected it to
work, but then we got complaints of people not being able to startup
eclipse because it is using a jdk 1.3.x from the path environment variable.
So I concluded the -vm parameter didnt work and went looking for a
solution.
After waisting hours looking for a solution I discovered that the
eclipse.ini must be the most sensitive ini i have ever encountered...
It seems that you need to split up that parameter in 2 lines like:
-vm
d:\bea81sp5\jdk142_08\bin\javaw.exe
and only then it works...
i found a VERY limited example of this over here:
http://www.eclipse.org/swt/launcher.html
but thats not all, for some it still didnt work
After looking a bit longer i found out that a SPACE behind "-vm" disabled
the parameter too...
so that one i solved myself... but the reason i could solve it, is because
i could test it... if the parameter didnt work eclipse wouldnt start
because it was missing the correct jdk...
but the other 2 parameters i cant even check if they work... so i dont
even know if the syntax for those 2 is correct :(
some people told me to look in the configuration details of the about
window, but if i put the word "crap" inside the ini, "crap" is also shown
in the configuration details... so the configuration details dont tell
anything about parameters working or not...
offcourse ive googled my ass off for finding nice examples or
documentation of the eclipse.ini syntax, but every site sais something
different and none mention something about eclipse.ini being picky about
the syntax...
one site sais it has to be
-name eFlex Portfolio Eclipse
the other sais
-name
eFlex Portfolio Eclipse
one sais
-vmargs-Xms256m-Xmx1024m
the other sais
-vmargs -Xms256m -Xmx1024m
and others even say
-vmargs
-Xms256m
-Xmx1024m
which doesnt even work for me
i could imagine it could also be something like
-vmargs
-Xms256m-Xmx1024m
or
-vmargs
Xms256m Xmx1024m
So...
i am hoping at least someone over here know how it should be set up, or
even more important perhaps: how can i check if the parameters work?
and perhaps in the future, the eclipse developers can make their inis
perhaps a bit less sensitive?
|
|
|
Re: eclipse.ini is the most sensitive, undocumented ini ever? plz help... [message #301461 is a reply to message #301459] |
Fri, 31 March 2006 08:25 |
Eclipse User |
|
|
|
Originally posted by: eclipse.bettsockentraeger.de
open a Bugreport on it. This brings the problem to the attention of the
eclipse team.
Maarten Van der Auwera wrote:
> Hi all,
>
> As you can read in the topic, im pretty confused by the way the ini
> works...
>
> There are 3 things i need in the ini:
> 1) -vmargs-Xms256m-Xmx1024m
> 2) -name eFlex Portfolio Eclipse
> 3) -vm d:\bea81sp5\jdk142_08\bin\javaw.exe
>
> In the beginning i just put those lines in the ini and expected it to
> work, but then we got complaints of people not being able to startup
> eclipse because it is using a jdk 1.3.x from the path environment variable.
>
> So I concluded the -vm parameter didnt work and went looking for a
> solution.
>
> After waisting hours looking for a solution I discovered that the
> eclipse.ini must be the most sensitive ini i have ever encountered...
>
> It seems that you need to split up that parameter in 2 lines like:
>
> -vm
> d:\bea81sp5\jdk142_08\bin\javaw.exe
>
> and only then it works...
>
> i found a VERY limited example of this over here:
> http://www.eclipse.org/swt/launcher.html
>
> but thats not all, for some it still didnt work
>
> After looking a bit longer i found out that a SPACE behind "-vm"
> disabled the parameter too...
>
> so that one i solved myself... but the reason i could solve it, is
> because i could test it... if the parameter didnt work eclipse wouldnt
> start because it was missing the correct jdk...
>
> but the other 2 parameters i cant even check if they work... so i dont
> even know if the syntax for those 2 is correct :(
> some people told me to look in the configuration details of the about
> window, but if i put the word "crap" inside the ini, "crap" is also
> shown in the configuration details... so the configuration details dont
> tell anything about parameters working or not...
>
> offcourse ive googled my ass off for finding nice examples or
> documentation of the eclipse.ini syntax, but every site sais something
> different and none mention something about eclipse.ini being picky about
> the syntax...
>
> one site sais it has to be -name eFlex Portfolio Eclipse
>
> the other sais
> -name
> eFlex Portfolio Eclipse
>
> one sais -vmargs-Xms256m-Xmx1024m
>
> the other sais
> -vmargs -Xms256m -Xmx1024m
>
> and others even say
> -vmargs
> -Xms256m
> -Xmx1024m
> which doesnt even work for me
>
> i could imagine it could also be something like -vmargs
> -Xms256m-Xmx1024m
>
> or
> -vmargs
> Xms256m Xmx1024m
>
> So...
>
> i am hoping at least someone over here know how it should be set up, or
> even more important perhaps: how can i check if the parameters work?
>
> and perhaps in the future, the eclipse developers can make their inis
> perhaps a bit less sensitive?
>
|
|
|
Re: eclipse.ini is the most sensitive, undocumented ini ever? plz help... [message #301482 is a reply to message #301459] |
Fri, 31 March 2006 15:41 |
Eclipse User |
|
|
|
Originally posted by: varavamu.yahoo.com
when using these same params from the cmdline:
the vmargs should be the last set of param group - since everything
beyond that switch is shunted off to the jvm. did that cause your problems?
hth,
vijay
Maarten Van der Auwera wrote:
> Hi all,
>
> As you can read in the topic, im pretty confused by the way the ini
> works...
>
> There are 3 things i need in the ini:
> 1) -vmargs-Xms256m-Xmx1024m
> 2) -name eFlex Portfolio Eclipse
> 3) -vm d:\bea81sp5\jdk142_08\bin\javaw.exe
>
> In the beginning i just put those lines in the ini and expected it to
> work, but then we got complaints of people not being able to startup
> eclipse because it is using a jdk 1.3.x from the path environment
> variable.
>
> So I concluded the -vm parameter didnt work and went looking for a
> solution.
>
> After waisting hours looking for a solution I discovered that the
> eclipse.ini must be the most sensitive ini i have ever encountered...
>
> It seems that you need to split up that parameter in 2 lines like:
>
> -vm
> d:\bea81sp5\jdk142_08\bin\javaw.exe
>
> and only then it works...
>
> i found a VERY limited example of this over here:
> http://www.eclipse.org/swt/launcher.html
>
> but thats not all, for some it still didnt work
>
> After looking a bit longer i found out that a SPACE behind "-vm"
> disabled the parameter too...
>
> so that one i solved myself... but the reason i could solve it, is
> because i could test it... if the parameter didnt work eclipse wouldnt
> start because it was missing the correct jdk...
>
> but the other 2 parameters i cant even check if they work... so i dont
> even know if the syntax for those 2 is correct :(
> some people told me to look in the configuration details of the about
> window, but if i put the word "crap" inside the ini, "crap" is also
> shown in the configuration details... so the configuration details
> dont tell anything about parameters working or not...
>
> offcourse ive googled my ass off for finding nice examples or
> documentation of the eclipse.ini syntax, but every site sais something
> different and none mention something about eclipse.ini being picky
> about the syntax...
>
> one site sais it has to be -name eFlex Portfolio Eclipse
>
> the other sais
> -name
> eFlex Portfolio Eclipse
>
> one sais -vmargs-Xms256m-Xmx1024m
>
> the other sais
> -vmargs -Xms256m -Xmx1024m
>
> and others even say
> -vmargs
> -Xms256m
> -Xmx1024m
> which doesnt even work for me
>
> i could imagine it could also be something like -vmargs
> -Xms256m-Xmx1024m
>
> or
> -vmargs
> Xms256m Xmx1024m
>
> So...
>
> i am hoping at least someone over here know how it should be set up,
> or even more important perhaps: how can i check if the parameters work?
>
> and perhaps in the future, the eclipse developers can make their inis
> perhaps a bit less sensitive?
>
|
|
| | | |
Re: eclipse.ini is the most sensitive, undocumented ini ever? plz help... [message #301753 is a reply to message #301459] |
Wed, 05 April 2006 10:57 |
Guenther Koegel Messages: 56 Registered: July 2009 |
Member |
|
|
Hi Maarten,
Maarten Van der Auwera schrieb:
> Hi all,
>
> As you can read in the topic, im pretty confused by the way the ini
> works...
>
> There are 3 things i need in the ini:
> 1) -vmargs-Xms256m-Xmx1024m
> 2) -name eFlex Portfolio Eclipse
> 3) -vm d:\bea81sp5\jdk142_08\bin\javaw.exe
.... text deleted ...
after checking the implementation of the platform launcher (eclipse.exe)
I would like to clarify the format of the ini file:
* one argument per line
* no leading or trailing blanks/tabs
* no empty lines
Why? On Windows it's very common to have blanks in file names and
directories. Only *very* clever programming and a lot of context is
needed to distinguish between parameter and option. It can be done, but
it is awfully complicated...
The solution is now: *one* argument by line, so your ini file looks like
this:
-vmargs
-Xms256m
-Xmx1024m
-name
eFlex Portfolio Eclipse
-vm
d:\bea81sp5\jdk142_08\bin\javaw.exe
and everything is easy to parse :-)
If you want to test it, write a simple Java application and check the
System properties you give in the ini file, e.g.:
.... eclipse arguments, e.g. -clean or -name ...
.... last comes the -vmargs option
-vmargs
....
-Dtest.property=A text with blanks in it
-Dtest.reason=thats why it must be on one line
Hope that helps.
Bye
Günther
|
|
| | |
Re: eclipse.ini is the most sensitive, undocumented ini ever? plz help... [message #301774 is a reply to message #301763] |
Wed, 05 April 2006 14:26 |
Guenther Koegel Messages: 56 Registered: July 2009 |
Member |
|
|
Hi Maarten,
Maarten Van der Auwera schrieb:
> This helps alot already... Thanks!
You are welcome! It's always a pleasure to guide other through ways I
have skinned my knees too. :-)
> But i still have a few smaller questions:
> 1) i am a bit confused by what you mean by arguments (eg: 1 argument per
> line)
> Do you mean that BOTH the "parameter" (eg -vm) AND the "value" (eg
> d:\bea81sp5\jdk142_08\bin\javaw.exe) are sepperated arguments? cause i
Exactly! Remember the method "public static void main(String[] args)"?
Think that each line will be one element in the args array.
> would think that those 2 form ONE argument... But still i think i
> understand what your point is (parameters and values both on sepperated
> lines)
People have a different understanding of arguments and parameters... So
I introduce a new naming: an option and an option with a value. An
example: The DIR command from Windows.
DIR [file] [options]
DIR A:\myfile.txt /4 /X
The command gets one value "A:\myfile.txt" and two options "/4" and
"/X", a total of 3 arguments.
> By this i assume that -vmargs is a parameter and -Xms256m and -Xmx1024m
> are values of the -vmargs parameter... right?
If you want to distinguish that...
> 2) at the end you say that the vmargs argument comes last, but in your
> example you put it first?
Sorry my fault! The option "-vmargs" separates the Eclipse
options/parameters (e.g. -clean, -name, -nl en_US, -showlocation) from
the JVM options (e.g. -ea -Xmx128M, -Dproperty.name=value). Some options
like "-nl" need a value like "en_US", but the for argument parsing they
are all the same. Have a look in the online documentation for the
Eclipse command line options.
> -vmargs
> -Xms256m
> -Xmx1024m
> -name
> eFlex Portfolio Eclipse
^^^^^^^^^^^^^^^^^^^^^^^^^
Sorry, -name must appear before -vmargs
> -vm
> d:\bea81sp5\jdk142_08\bin\javaw.exe
> do you perhaps mean that: when giving the arguments straight to eclipse,
> not through the ini, THEN the vmargs argument should come last?
The gory details are much more horrible!
With Eclipse 3.2 the command line arguments are *MERGED* with the
arguments in the ini file. This works fine except for the "-vmargs"
argument which must appear at most only one time, on the command line
XOR in the ini file. You cannot mix!
> 3)I dont really understand how i can test it by checking the system
> properties of a simple java app in the ini file? i write things in the
> ini file, and i want to test if that works, so by checking the ini file
> i can only see what i myself wrote in it? so i dont get your point
Setup:
---------------- ini file ---
-vmargs
....
-Dtest.property=Hello
---------------- Java -------
public class Main {
public static void main(String[] args)
{
System.out.println(System.getProperty("test.property"));
}
}
When running this Java application you should see as output the value of
the property "test.property" you gave in the ini file.
Other JVM specific arguments like -Xmx100M are not visible to you
because they change internal settings of the JRE.
A bit clearer now?
Bye
Günther
|
|
| | | | | |
Re: eclipse.ini is the most sensitive, undocumented ini ever? plz help... [message #302056 is a reply to message #302054] |
Tue, 11 April 2006 10:17 |
Guenther Koegel Messages: 56 Registered: July 2009 |
Member |
|
|
Hi Maarten,
Maarten Van der Auwera schrieb:
> ... text deleted
> but i just discovered the following text about the starteam
> crossplatform client (so NOT the eclipse plugin, this is a sepperate
> client prog):
>
> 1 Changing StarTeam to English.
> 1) locate ?StarTeamCP.stjava? (by default in C:\Program
> Files\Borland\StarTeam Cross-Platform Client 2005 R2)
> 2) open the file ?StarTeamCP.stjava? in a text editor.
> 2) look for the : "[Java VM]" section
> 3) then the "options=" line
> 4) add the VM parameters, like so:
> "options=-Xmx256m -Duser.language=en" without the quotes of course.
> Now Starteam client will start up in the locale of the machine they are
> running on BUT all the menus will be in English
> If you were wanting to change the locale the StarTeam client runs in
> this can be done in a similar way, by adding "user.region" option:
> "options=-Xmx256m -Duser.language=de -Duser.region=GB" without quotes.
>
> If understand this well, then this mean that -Duser.language=en
> -Duser.country=US
> are also JVM parameters and not StarTeam plugin parameters.
>
> is this correct?
Hmmm, no, although I might split a very fine hair. :-)
Eclipse uses the option "-nl" plus language encoding to select language
settings, e.g. -nl en_US or -nl de_DE. What you set with -D are system
properties. Who cares is *APPLICATION* dependent! Some properties are
used by the JVM, e.g. user.home or user.name. So you can override your
(short) login name with your full name by specifying
-Duser.name=Maarten Van der Auwera
as an option and Eclipse uses as @author your real name...
> This means that the position of them is behind the -vmargs parameter (as
> you have allready told a few posts ago)?
Yes. System properties are read/set by the JVM therefore they must
appear after the -vmargs.
> i am sorry for all uncertainty, but i guess im kinda hard to convince ;)
Hope that helps.
Bye
Günther
|
|
| | |
Goto Forum:
Current Time: Sun Sep 22 11:17:50 GMT 2024
Powered by FUDForum. Page generated in 0.06438 seconds
|