如何让Eclipse提示我输入命令行参数 [英] How to make Eclipse prompt me for command line arguments

查看:177
本文介绍了如何让Eclipse提示我输入命令行参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以在运行配置中配置命令行参数,但是我想使用不同的命令行参数多次运行java文件。每次更改运行配置都是一个痛苦。



有没有办法让Eclipse每次运行程序时都提示我输入命令行参数?

解决方案

string_prompt 添加为程序参数运行配置中的c $ c>

  $ {string_prompt} 

还有一个 file_prompt code> folder_prompt 如果你想要具体的文件\folders。



这些可通过变量按钮在(x)=参数选项卡上运行配置对话框。


I know I can configure command line arguments in the Run configuration but I want to run a java file multiple times with different command line arguments. It's a pain to change the Run Configuration every time.

Is there a way I can make Eclipse prompt me for command line arguments every time I run the program?

解决方案

Add string_prompt as a Program Argument in the Run configuration.

 ${string_prompt}

There are also a file_prompt and a folder_prompt if you want specifically files\folders.

These are available through the Variables button on the (x)= Arguments tab of the Run Configuration dialog.

这篇关于如何让Eclipse提示我输入命令行参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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