Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass string to Runtime.getRuntime ().exec command

Status
Not open for further replies.

Wrathchild

Technical User
Aug 24, 2001
303
US
Hi, my code works with the application path and website address passed to the command, but I would like to use a string "IE" to store the app path and then pass IE instead.

String IE = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE";

String [] commands = new String [] {IE," System.out.println (commands);
Process child = Runtime.getRuntime ().exec (commands);

I get "Cannot resolve symbol, symbol variable: IE"
thanks!
 
nevermind, I had to just put the string in the right place
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top