How Can I Pipe the Java Console Output to File Without Java Web Start?

前端 未结 4 868
暗喜
暗喜 2020-12-16 02:59

I am wanting to pipe the Java console output (generated by System.out.println and its ilk) to a file. I found an excellent solution here to enable Java tracing,

4条回答
  •  天命终不由人
    2020-12-16 03:04

    If you want to run the problem in the background, do this -

    nohup java -jar yourprogram.jar > log.txt 2>&1 &
    

提交回复
热议问题