简体   繁体   English

双击jar时,java输出流会怎样?

[英]What happens to java output stream when jar is double clicked?

I have a java application with a swing UI. 我有一个带有回转UI的Java应用程序。 It also outputs to the console using System.out.println. 它还使用System.out.println输出到控制台。 My question is what happens to the output when the jar file is double clicked. 我的问题是双击jar文件时输出会发生什么。 Is it stored in the java VM memory and does it take up resources? 它存储在Java VM内存中并且占用资源吗? or is it discarded and not stored anywhere? 还是被丢弃而没有存储在任何地方?

There is no console attached when you double click on the jar. 双击jar时没有控制台连接。 So System.out.println will go nowhere. 因此System.out.println将无处可去。 Instead use a logging framework. 而是使用日志记录框架。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM