This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Running an exe file  RSS feed

 
sudeepv
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !!
Needed some help urgently !!!
I wanted to execute a binary that creates a username and password using a Java program, So I used the Runtime Class to do this.
The statement was something like this:
Runtime.getRuntime().exec(".... the command ...");
But then if it is for some command like username and password checking then after giving the username how do I give the password.
Thanks !!!
 
Manish Joshi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How You pass the UserName same Concanate it with the password and let the binary file take care of splitting it for splitting these you may use Delimiters
If you feel that I didinot understood your problem let me Know
javaexams@yahoo.com
Manish India
 
sudeepv
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did try what u suggested but unfortunately that does not seem to work. Some of the manuals of Sun Java say that this is a very complicated one!!!
 
Maki Jav
Ranch Hand
Posts: 449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can see this site for parameter passing

http://www.mindprod.com/jgloss/exec.html

Maki Jav
[ September 14, 2006: Message edited by: Maki Jav ]
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, sudeepv. You must have missed our naming policy on the way in. In short, your displayed name must be your first and last name, seperated by a space. It keeps things friendly and professional around here. You can change your name here.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Describe how this other program works if you just run it on the command line. Is it something like this?

User types program name, enter
Program says "Enter userid"
User types userid, enter
Program says "Enter password"
User types password, enter
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!