Re: System.getenv()
- From: Juha Laiho <Juha.Laiho@xxxxxx>
- Date: Tue, 16 May 2006 19:35:15 +0000 (UTC)
Benjamin Lerman <news+news-free@xxxxxxxxx> said:
My problem is: I need to exec an external process, and I need to add an
environment variable before doing so.
The problem is that if I use Runtime.exec(String), my environment is
the old one without my variable, and If I put an array with my new
environment variable, I lost my old environment.
If you're working with just Unix platforms, you could use /usr/bin/env
as a helper to start the external application, like:
/usr/bin/env NEWVARIABLE=value /path/to/extcomm arg1 arg2
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
.
- References:
- System.getenv()
- From: Benjamin Lerman
- Re: System.getenv()
- From: Benjamin Lerman
- Re: System.getenv()
- From: Rhino
- Re: System.getenv()
- From: Benjamin Lerman
- System.getenv()
- Prev by Date: Hibernate using EJB?
- Next by Date: Hibernate vs (EJB or JDBC)
- Previous by thread: Re: System.getenv()
- Next by thread: Re: System.getenv()
- Index(es):
Relevant Pages
|