Monday 15 March 2010

eclipse - Input values to a normal JAVA SE program -


I am new to Java and I am currently trying both Netbeans and Eclipse.

I 'My jaw is confused about inputting values ​​in the application. I think the output is displaying in the Eclipse on the output window ... but, I do not know the input values ​​... ??

In these, a normal console application in .Net, we can input the input value through the console window (command prompt window), but I do not have any command prompt window when I run my java program I run in input values ​​or type anything. How do I

thanks

If I remember correctly, You can type in Eclipse's Java console and this standard input stream will be sent through System.in (perhaps based on the application's configuration of the application).

Although the standard way to do this is to pass several strings on the command line, which will appear as the elements of strings for your app's main method Ing [] parameter.

Alternatively, you can get the input through the flat files, through the socket from the database etc. Although it is, as you can expect, is very complex and will definitely not be considered for the application of "Hello World" type, for example Java web services, instead of command line, through network sockets Take input, because it will later limit them to some extent. ; -)


No comments:

Post a Comment