开发者

How can I provide inputs to a java application during run-time, through netbeans window?

How can I provide inputs to a java application during run-time, through netbeans window ? or through any dialog box ??

I know there is an option to add parameters through the project property window, but it does not help to 开发者_StackOverflow社区add run-time inputs.


Define an input stream like this:

BufferedReader b = new BufferedReader(new InputStreamReader(System.in)); //input buffer 

and then use it to take command-line input like this:

a=b.readLine();


I don't know why you want to do this in "netbeans" but to java programs you can provide inputs in this ways:

  1. read file
  2. read standard input
  3. use swing components which read input
  4. to only debugging purpose: use debug mode and breakpoint to stop and change any variables
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜