jQuery in Action, 2nd edition*
The moose likes Swing / AWT / SWT and the fly likes Give commands of command line from gui Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Give commands of command line from gui" Watch "Give commands of command line from gui" New topic
Author

Give commands of command line from gui

Karamjeet singh
Ranch Hand

Joined: Feb 24, 2010
Posts: 49

i am making a software like netbeans ide
so i want to know how to give commandline commands
like javac Filename.java from java gui
to compile the file


Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
java.lang.ProcessBuilder

java.lang.Runtime.exec(...)
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

You can also look at Exec library form the Apache Commons project


Mohamed Sanaulla | My Blog
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39833
    
  28
Never go anywhere near exec() until you have read the classic article by Michael Daconta When Runtime.exec() won't.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

Campbell Ritchie wrote:Never go anywhere near exec() until you have read the classic article by Michael Daconta When Runtime.exec() won't.


Really useful article. Thanks for sharing it.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39833
    
  28
You're welcome
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Give commands of command line from gui