• Post Reply Bookmark Topic Watch Topic
  • New Topic

cmd command  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i need a help please
who i can ask the user to write a input in the cmd command (i am asking for the scanner command, i hope i'm correct)? and how i can processes this data in any forward use

thanks
 
Ranch Hand
Posts: 108
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you going to ask the user the input arguments at the start of running the program?..if yes, command line arguements would work for you. Else you can always user DataInputStream or BufferedInputStream readers.

Thanks,
Pavan.
 
Hassan Massalha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my program extract a set of data to a file, i used already DataInputStream.
i want the program to ask the user at the beginning of each run to enter a file name, that will be the file name of the extracted file.
how i can do that?

i sorry if i wasn't clear enough
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using input streams? Are you reading binary files? If you really are “beginning”, there is a good chance you are actually using the wrong classes. You will find about IO in the Java Tutorials.

I would suggest you use a file chooser, which shows dialogues. These can be used independently of other GUI components, but you might need to specify that the Component it appears in front of is null. There is a Java Tutorials section about file choosers, too.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!