Reputation: 31
I created jar file and I run it using command as follows:
$ java -jar niidle.jar arguments...
it is showing correct output. But I cant see the whole output. I want to see the whole output. so how to redirect this whole thing to text file, when I run following command:
$ java -jar niidle.jar arguments...
Upvotes: 3
Views: 7554
Reputation: 3427
To save error logs in a file and normal console logs in another file:
java -jar niidle.jar arguments 2> errorOutput.log > output.log
Upvotes: 1
Reputation: 2232
If you do not need to save the output for future reference, you can read the full output this way:
java -jar niidle.jar arguments | less
Obviously, we are supposing that there is no user interaction. Otherwise you can do something like the following example to save the output and review it later.
java -jar niidle.jar arguments | tee output
... some user interaction ...
less output
Upvotes: 0