Re: Shell output vs Process streams
- From: Gordon Beaton <not@xxxxxxxxx>
- Date: 27 Jul 2005 22:33:32 +0200
On 27 Jul 2005 12:49:42 -0700, Marcus Leon wrote:
> I'm trying to call a shell script from Java and read the script
> output. Right now I get different text when I run the script from
> the command line vs. when I run it from Java using the Process
> class. Does anyone know why? Thanks.
Aside from the apparent errors in the script based on the output
you've provided, I suspect the environment seen by the script is
different when run from Java than when run from the command line.
Not really a java issue, but perhaps you should read the manpage for
your shell, and look for things explaining the differences between
interactive and non-interactive shells, and login and non-login
shells.
/gordon
--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
.
- References:
- Shell output vs Process streams
- From: Marcus Leon
- Shell output vs Process streams
- Prev by Date: Re: J2EE installation help
- Next by Date: Re: newbie q: .java file and java project difference
- Previous by thread: Shell output vs Process streams
- Next by thread: Writing and running files from a Java/AspectJ application.
- Index(es):
Relevant Pages
|
|