简体   繁体   English

从Eclipse启动应用程序时如何启动Java控制台?

[英]How to start the java console when launching an application from Eclipse?

When I start a java application, the Java Console is started. 当我启动Java应用程序时,将启动Java控制台。 But when I start a java application from Eclipse, the Java Console does not start on its own. 但是,当我从Eclipse启动Java应用程序时,Java控制台不会自行启动。 How can I make it start also when I run an application from Eclipse? 从Eclipse运行应用程序时,如何使它也启动?

Take a look at this topic .. I think it is exactly what you want. 一下这个主题 ..我认为这正是您想要的。

There is an answer of how to be able to use step-through debugging from Eclipse. 关于如何能够使用Eclipse的逐步调试的答案。

What for do you need java console? 您需要什么Java控制台? There is window console in Eclipse IDE where all System.out.println are redirected. Eclipse IDE中有一个窗口控制台,所有System.out.println都被重定向。

If you are wanting the program to start in it's own window. 如果您希望程序在其自己的窗口中启动。 Try running it as an external tool. 尝试将其作为外部工具运行。 The program would be cmd.exe and the argument would be your java command line, eg "java -cp c:\\myclasspath myProg" and so forth. 程序为cmd.exe,参数为Java命令行,例如“ java -cp c:\\ myclasspath myProg”,依此类推。

First check that no other console is pinned, icon looks like window with a needle in it. 首先检查是否没有固定其他控制台,图标看起来像是带有针的窗口。 This means that no other console except the one that is pinned will show the output. 这意味着除固定的控制台外,没有其他控制台将显示输出。 If everything else fails try to reset the java perspective in Eclipse. 如果其他所有方法均失败,请尝试在Eclipse中重置Java透视图。

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

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