Hi all,

I am new to shell script.
I'm currently running a java application using shell script.
When i'm running the java applicaton i need to print all the System.out.println() statements in a file.
I don't know how to implement it..
Can any one help me on this.
Thanks in advance
:)

Regards,
Ajay

Hi Ajay!

I'm not that familiar with Java, so are the System.out messages what gets printed on the command line?

If' so, you'll want to run your java app like this: ./java-app >> log.txt Seems like I read a similar post, and someone was having trouble getting the error messages that way, so you may want to redirect stderr to stdout for logging purposes. Like this! ./java-app >> log.txt 2>&1 Hope this helps!
-G

hi Ajay
what is this "./java-app" is it a file ? ...

Hey there,

I would assume it's a representation of a generic compiled java binary.

Best wishes,

Mike

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.