简体   繁体   中英

View the console output of a running Java program, from another Java app

I have a program made in Java, which you want to configure as an operating system service. The program reads data received by socket, which processes and stores it. It also logs errors and finally prints the information flow all the time in console to observe its operation.

After setting it up as a service, a need arose.

How do I view the print activity in console, if the application is in the background and therefore the console is not open?

Is there a way to view the console output of that application?

It occurred to me, if it is possible to create another Java application to read and print the console output of the created service. Would that solve the problem?

非常感谢您的评论,根据您的建议,在进行了更深入的研究之后,我通过套接字开发了一个IPC通信系统,其中,一个swing应用程序连接到该服务并每2秒请求一次所需的信息和示例。在应用程序中

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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