I have a .jar
file I am executing that with java -jar file_name.jar
.
Then the program outputs to the IDE console, a prompt asking the user for credentials. After authenticating, the program prints database data to the console.
How can I redirect the console data output to a filestream?
I tried adding logger
while executing the command java -jar file_name.jar
. But no success.
I am not a java person, so I don't have any idea how to do that. Any suggestion or help will be great.
EDIT
Screenshot addded for the GUI screen
if it's from java console: