Sign in to follow this  
Followers 0
Superbrka

RunWait & Java Output

4 posts in this topic

#1 ·  Posted (edited)

Hi,

Just a shot question. Is there any way to get java output to a log file using RunWait (or ShellExecute) ?

Like:

RunWait("C:Program FilesJavajre6binjava.exe -classpath C:tempmyjar.jar 1>C:templog_file.log", "",@SW_HIDE)

Thanks !

Edited by Superbrka

Share this post


Link to post
Share on other sites



what about:

$output = RunWait("C:\Program Files\Java\jre6\bin\java.exe -classpath C:\temp\myjar.jar 1>C:\temp\log_file.log", "",@SW_HIDE)
MsgBox(0x0,"Output",$output)

Share this post


Link to post
Share on other sites

what about:

$output = RunWait("C:Program FilesJavajre6binjava.exe -classpath C:tempmyjar.jar 1>C:templog_file.log", "",@SW_HIDE)
MsgBox(0x0,"Output",$output)

but I need a log file

Share this post


Link to post
Share on other sites

Sorry,

I don't know what I've readed... X(

you can have directly the information in the stdout or stderr...

#include <Constants.au3>
$pid = Run("C:\Program Files\Java\jre6\bin\java.exe -classpath C:\temp\myjar.jar", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
ProcessWait($pid)
MsgBox(0x0,"",StdoutRead($pid))
MsgBox(0x0,"",StderrRead($pid))

Note: You can then put them in a file if you need it, but there is probably a better way to do this...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0