0

I want to create one standalone executable file which accepts some user input and it should use those inputs as arguments to run a command at CMD as background process. For GUI i thought of using swings and to run cmd batch file . Is it possible to merge java files and batch file to form an exe.? or i should go for someother scripting languages to execute command at background process and someother programming languages for UI design ? Thanks in advance.

sreram
  • 99
  • 2
  • 9
  • [This question](http://stackoverflow.com/questions/4005378/console-writeline-and-system-out-println) might help. – BDM Mar 15 '13 at 05:49

1 Answers1

0

Theoretically you could do this all in Java. As you mentioned, you could use Swing to read in the user input. Instead of trying to get ahold of the input data from a separate batch file, you could just use Java's Runtime class to execute a command using the inputs as arguments.

And, if you need this all to run from an executable, you could use a utility like Launch4J or JSmooth to wrap the Java application.

Jake Stoeffler
  • 2,662
  • 24
  • 27
  • thanks for your reply. let me make my question clear. for ex: if i have a command like ( a.exe -b id -f ) here a.exe, -b id -f were default. arg1 and arg2 should be supplied from user input to make complete command and i want to execute this as background process. is this possible from Runtime class?? In unix & is used o run background process . what about windows machines then? – sreram Mar 17 '13 at 05:00