> Hi,
>
[quoted text clipped - 10 lines]
>
> and non of the above seem to do the trick..
Runtime.getRuntime().exec will start a separate shell each tine its
called, so nothing do in one call can affect the environment for a
subsequent call. I think your best choices are:
- run a script that sets the environment before running the program
- change .profile in the user you're running under to set
LD_LIBRARY_PATH
- recompile the program with static linking
...listed with best choice first.

Signature
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
Gordon Beaton - 01 Jun 2007 13:43 GMT
> Runtime.getRuntime().exec will start a separate shell each tine its
> called, so nothing do in one call can affect the environment for a
> subsequent call.
However at least one version of Runtime.exec() lets you specify the
environment for the child process being invoked. Combine that with
System.getEnv() and you can make changes to the default enviromnent
before passing it to Runtime.exec().
Or use ProcessBuilder.environment().
/gordon
--
Nigel Wade - 01 Jun 2007 17:24 GMT
>> Hi,
>>
[quoted text clipped - 21 lines]
>
> ...listed with best choice first.
or do what Robert suggested when this post was sent yesterday...

Signature
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555