LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2010, 09:27 AM   #1
aparna.v
LQ Newbie
 
Registered: Mar 2010
Posts: 6

Rep: Reputation: 0
How to run Linux commands using a Java program?


Hi,
I want to execute Linux commands using a Java program. I came to know that we can use Runtime.getRuntime().exec("commands") to execute the commands through the program. I'm new to both Linux and Java. It would be helpful if i get more information on this.
 
Old 04-09-2010, 09:36 AM   #2
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
A quick googling gave me this, I hope this is helpful
http://www.wellho.net/resources/ex.p.../Discfree.java
 
Old 04-09-2010, 09:37 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Did you just answer your own question??

Languages typically have a protocol for accessing the shell. Where did you find the example that you cite for Java?

Here's what Google found using "java system call":
http://www.google.com/search?q=java+...ient=firefox-a
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 03:56 AM
Run sample java program on jpcap in linux Nadishka Linux - Software 5 10-29-2009 01:37 AM
what commands to type to run a c program vitalstrike82 SUSE / openSUSE 2 02-21-2008 08:21 PM
how to run linux command from java program? ranger225 Linux - Newbie 1 11-10-2004 06:55 AM
Looking to run java commands outside bin/ nro Linux - Newbie 7 08-25-2004 02:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration