Hey guys! I have a really short Java question for you... How does one make a system call from Java? I want to be able to run a Linux command, e.g., System("command"); in C. The idea behind this is that I'm writing an example Java program to install an application, for example Postfix, that I may want to use as an example for Students... Later! Steve
Try googing for it? I did "java system call exec" and got http://stein.cshl.org/jade/distrib/docs/java.lang.Runtime.html#exec(java.lang.String[]) Does that work? There might be issues with the VM security. But this is a linux list :) On Mon, 3 Mar 2003, Daukas, Stephen C wrote:
Hey guys!
I have a really short Java question for you... How does one make a system call from Java? I want to be able to run a Linux command, e.g., System("command"); in C.
The idea behind this is that I'm writing an example Java program to install an application, for example Postfix, that I may want to use as an example for Students...
Later! Steve
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
-- ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø Karl Hiramoto <karl@hiramoto.org> Work: 978-425-2090 ext 25 Cell: 508-517-4819 Personal web page: http://karl.hiramoto.org/ Freedom: http://www.technojihad.com/ Zoop Productions: http://www.zoop.org/ KTEQ Rapid City: http://www.kteq.org/ AOL IM ID = KarlH420 Yahoo_IM = karl_hiramoto ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø Neutrinos have bad breadth.
Steve Try class Runtime use Runtime.getRuntime(). This will let you interact with you environment. Process process = Runtime.getRuntime().exec(mCmdArray, mEnvp, mDir); Peter N. -----Original Message----- From: wlug-admin@mail.wlug.org [mailto:wlug-admin@mail.wlug.org]On Behalf Of Daukas, Stephen C Sent: Monday, March 03, 2003 11:40 AM To: wlug@mail.wlug.org Subject: [Wlug] Java Question... Hey guys! I have a really short Java question for you... How does one make a system call from Java? I want to be able to run a Linux command, e.g., System("command"); in C. The idea behind this is that I'm writing an example Java program to install an application, for example Postfix, that I may want to use as an example for Students... Later! Steve _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
participants (3)
-
Daukas, Stephen C
-
Karl Hiramoto
-
Peter Nikolla