• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
java process not executing command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

java process not executing command


  • Subject: java process not executing command
  • From: Wolfram Stebel <email@hidden>
  • Date: Wed, 28 Sep 2005 17:19:19 +0200

hi all,

i have an app running, which listens on apache logs via "tail -f -n 0
path/filename".
works fine.
Now i want to execute "ls -lat /var/log/httpd/access_log*".
from the error stream i get "ls: /var/log/httpd/access_log*: No such file or
directory".

Wy does it execute the tail but not the ls?

should i send my xserve to school?  :-)

when i execute the logged command from the commandline it works!

The tail process is still running and i receive it's output via the input
stream.

Is it possible to have two processes running using Runtime.getRuntime
().exec ( command ), also to have the corresponding error and input streams?

this is the code how i start the processes:

a)
p = Runtime.getRuntime ().exec ( "tail -f -n 0 /var/log/httpd/access_log" );
in = new BufferedReader( new InputStreamReader ( p.getInputStream () ) );

b)
checkProcess = Runtime.getRuntime ().exec ( "ls -lat
/var/log/httpd/access_log*" );
lsResult = new BufferedReader( new InputStreamReader
(checkProcess.getInputStream () ) );
BufferedReader error = new BufferedReader( new InputStreamReader (
checkProcess.getErrorStream () ) );

As far as possible, i'm sure, i have no coding errors...
In my user environment i have an alias for ls mapping to "ls -la" but this
will not be used for user "appserver" i think.

HELP! :-)

Thanks

Wolfram



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: java process not executing command
      • From: Sacha Mallais <email@hidden>
  • Prev by Date: Re: Can't remove extraneous spacing.
  • Next by Date: Suggestions for secure web services direction?
  • Previous by thread: JDBCAppender Logging Solution
  • Next by thread: Re: java process not executing command
  • Index(es):
    • Date
    • Thread