如何在Eclipse使用命令行参数

How To Use Command Line Arguments in Eclipse

如何在Eclipse使用命令行参数 


  1. 按下图操作
        Click on Run -> Run (not Run Last Launched).In the window shown below,
        notice that the Welcome Java application is highlighted.

    In the large subwindow of the Run window, there is a set of tabs,
        labelled Main, Arguments, JRE, etc.
    Notice that the Main tab is highlighted.

  2. Click on the Arguments tab.
    This action brings up a window
        with a few places to enter values.
    You want to type in all your input values
        into the Program arguments window,
            with spaces (blank characters) between each value.For the Welcome program,
        only one input argument value is needed:
            the first name of a new Java student.
    For this run, we have chosen Sarah as
            the name of this student.
     
    Notice where it has been typed in.
        This is where all command line arguments should be entered.
    These values remain the same for all runs,
        until they are changed in this same window.

  3. Then just click Apply, followed by Run.
        The screenshot below shows the output in the console window.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值