Eclipse Community Forums Forum Search:

Home » Newcomers » Newcomers » environment variables for eclipse.ini
environment variables for eclipse.ini Thu, 10 September 2009 07:04
 Lars FischerMessages: 105Registered: July 2009 Senior Member
Hello,

I would like to use windows environment variables values as parameters
in the eclipse.ini. E.g. JAVA_HOME with the path to the JDK for "-vm
%JAVA_HOME%\bin\javaw.exe"

I tried the above, but it does not work. Is there an other way how I can
solve this?

regards,
Lars
Re: environment variables for eclipse.ini [message #486248 is a reply to message #485042] Wed, 16 September 2009 17:15
 David WilliamsMessages: 176Registered: July 2009 Senior Member
Lars Fischer wrote:
> I would like to use windows environment variables values as parameters
> in the eclipse.ini. E.g. JAVA_HOME with the path to the JDK for "-vm
> %JAVA_HOME%\bin\javaw.exe"
>
> I tried the above, but it does not work. Is there an other way how I can
> solve this?
>

I don't believe so, since I couldn't find it documented anywhere, and
tried a few tests myself.

But just in case you are asking "how do I get the VM at JAVA_HOME used,
then that part should be automatically found by the launcher.
Re: environment variables for eclipse.ini [message #486377 is a reply to message #486248] Thu, 17 September 2009 09:30
 Lars FischerMessages: 105Registered: July 2009 Senior Member
Hello David,

David Williams wrote:
> Lars Fischer wrote:
>> I would like to use windows environment variables values as parameters
>> in the eclipse.ini. E.g. JAVA_HOME with the path to the JDK for "-vm
>> %JAVA_HOME%\bin\javaw.exe"
>>
>> I tried the above, but it does not work. Is there an other way how I
>> can solve this?
>>
>
> I don't believe so, since I couldn't find it documented anywhere, and
> tried a few tests myself.
>
> But just in case you are asking "how do I get the VM at JAVA_HOME used,
> then that part should be automatically found by the launcher.

JAVA_HOME is only one exmple for a configuration parameter.

I would like to define multiple settings which can differ on several
computers and prepare ONE eclipse installation deployed to this
computers to use the environment settings on startup. But it looks like
this is not possible.

Regards,
Lars
Re: environment variables for eclipse.ini [message #486427 is a reply to message #486377] Thu, 17 September 2009 11:15
 Eclipse User
Originally posted by: wegener.cboenospam.com

You could write a shell script/batch file to get this to work. The vm
parameter can be specified on the command line. Create a script file which
calls eclipse with a command line parameter of -vm
"%JAVA_HOME%\bin\javaw.exe". Then use the script file to run eclipse.

"Lars Fischer" <lfischer@fast-mail.org> wrote in message
news:h8tdla\$trn\$1@build.eclipse.org...
> Hello David,
>
>
> David Williams wrote:
> > Lars Fischer wrote:
> >> I would like to use windows environment variables values as parameters
> >> in the eclipse.ini. E.g. JAVA_HOME with the path to the JDK for "-vm
> >> %JAVA_HOME%\bin\javaw.exe"
> >>
> >> I tried the above, but it does not work. Is there an other way how I
> >> can solve this?
> >>
> >
> > I don't believe so, since I couldn't find it documented anywhere, and
> > tried a few tests myself.
> >
> > But just in case you are asking "how do I get the VM at JAVA_HOME used,
> > then that part should be automatically found by the launcher.
>
> JAVA_HOME is only one exmple for a configuration parameter.
>
> I would like to define multiple settings which can differ on several
> computers and prepare ONE eclipse installation deployed to this
> computers to use the environment settings on startup. But it looks like
> this is not possible.
>
> Regards,
> Lars
>
Re: environment variables for eclipse.ini [message #487143 is a reply to message #486427] Tue, 22 September 2009 03:10
 Lars FischerMessages: 105Registered: July 2009 Senior Member
Dave Wegener schrieb:
> You could write a shell script/batch file to get this to work. The vm
> parameter can be specified on the command line. Create a script file which
> calls eclipse with a command line parameter of -vm
> "%JAVA_HOME%\bin\javaw.exe". Then use the script file to run eclipse.

Thank you for the hint. I use it now this way.

Regards,
Lars