• Post Reply Bookmark Topic Watch Topic
  • New Topic

Executing an exe from java program  RSS feed

 
Natraj Gudla
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How do i execute an exe like javac or java or jad from another java program.I know that we can use the Exec() function from RunTime()...but i wanted some more clear explanation on that..
can any one help me?..
My clear requirement is that i want to convert some .class files in a directory to .java using jad exe..for this i want to run a java program and give the directory so that it converts one after the other at a time...
can any one help me?..
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a windows machine you can use something like:
Runtime.getRuntime().exec("jad.exe myparameter");
or put all the commands in a .bat file and run it using:
Runtime.getRuntime().exec("cmd /K start run.bat");
[ July 16, 2003: Message edited by: Cindy Glass ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!