Eclipse - 运行不在本机eclipse控制台中的程序 [英] Eclipse - Running programs not in the native eclipse console

查看:328
本文介绍了Eclipse - 运行不在本机eclipse控制台中的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



编辑



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

解决方案



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




I'm currently writing some ncurses code and the native Eclipse (3.2.2) console can't display its graphics. I'd instead like to run the program through xterm. What I want is to be able to start xterm and run from there. I'd prefer to not get involved with any plugins or that jazz. Just something simple.

EDIT

So I have the answer and it was pretty simple... Run -> External Tools -> External Tools -> New Launch Config... Then select location of your terminal emulator. /usr/bin/gnome-terminal in my case. after that set the appropriate arguments. "-e ~/ncurses/start" in my case. Then make sure you aren't allocating a console by unchecking that option in the "Common" tab.

解决方案

Annon add to his question:

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

The simplest way to do that is to report the command line into an external tool configuration, and point eclipse to use a shell (like described in this program)

In the argument, you will add the command line eclipse execute (command line which can be retrieved as mentioned in the second part of this answer below).
Of course, replace 'cmd.exe' by the shell of your choice, and try not setting the 'Allocate Console' checkbox in the Common tab of that external launcher.


To launch through a xterm, without eclipse involved (not what you are asking for, just keep here for archive)

You can launch your program through Eclipse (Run Configurations), and observe through a 'ps' command the exact Java command line used.
Or launch it in debug mode, and right click the task in Debug view and open Properties. It will show the command line, as documented here.

Then launch that command line directly in your console (Eclipse being not involved at all at this point).

这篇关于Eclipse - 运行不在本机eclipse控制台中的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆