Eclipse - 运行不在 native Eclipse 控制台中的程序

标签 eclipse

我目前正在编写一些 ncurses 代码,而 native Eclipse (3.2.2) 控制台无法显示其图形。相反,我想通过 xterm 运行该程序。我想要的是能够启动 xterm 并从那里运行。我宁愿不参与任何插件或爵士乐。只是一些简单的事情。

编辑

所以我有了答案,这很简单......
运行 -> 外部工具 -> 外部工具 -> 新建启动配置...
然后选择终端模拟器的位置。/usr/bin/gnome-terminal 在我的情况下。
之后设置适当的参数。 “-e ~/ncurses/start” 就我而言。
然后通过在“通用”选项卡中取消选中该选项来确保您没有分配控制台。

最佳答案

Annon补充他的问题:

its a pain to keep switching back and forth from eclipse and the terminal. I'm looking for a way to just hit something like"F5" and have it run my ncurses program in a new xterm terminal process



最简单的方法是将命令行报告到外部工具配置中,并指向 eclipse 使用 shell(如 this program 中所述)

http://www.avajava.com/tutorials/eclipse/how-do-i-open-a-windows-command-prompt-in-my-console/how-do-i-open-a-windows-command-prompt-in-my-console-03.gif

在参数中,您将添加命令行 eclipse execute(命令行,可以按照本答案的第二部分中所述进行检索)。
当然,用你选择的 shell 替换 'cmd.exe',然后尝试 未设置 ' Allocate Console ' 该外部启动器的“通用”选项卡中的复选框。

http://www.avajava.com/tutorials/eclipse/how-do-i-open-a-windows-command-prompt-in-my-console/how-do-i-open-a-windows-command-prompt-in-my-console-04.gif

通过 xterm 启动,不涉及 eclipse(不是你所要求的,只是保留在这里存档)

您可以通过 Eclipse(运行配置)启动您的程序,并通过“ps”命令观察所使用的确切 Java 命令行。
或者在 Debug模式下启动它,然后右键单击调试 View 中的任务并打开属性。它将显示命令行,如 documented here .

然后直接在您的控制台中启动该命令行(此时根本不涉及 Eclipse)。

http://www.aicas.com/jamaica/3.4/doc/html/debugger1.gif

关于Eclipse - 运行不在 native Eclipse 控制台中的程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/908488/

相关文章:

java - Eclipse 中的 Ant 构建失败 : Unable to understand the error from console

java - tomcat 显示 org.apache.catalina.LifecycleException

java - 构建可绘制图像以在 Android 的表面 Canvas 上使用

java - 在 Eclipse Luna 中创建 Android 应用程序时出现项目错误

eclipse - 为什么eclipse m2e错误 "add a version or custom suffix using name template in advanced settings"

android - 编辑布局时在 "tools palette"中显示我的自定义布局

eclipse - 在可见选项卡下保留以前打开的文件选项卡

Android VM 作为开发模拟器

java - 在 Eclipse 中进行动态 Web 项目或 Spring MVC 开发需要哪些插件

eclipse - 无法打开 drl 文件,因为它不存在