| | |
Possible to use system(); in Java?
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Hi,
I am new to Java.
Id like to know if I can use system commands in Java applications. Thanks in advance,
Jan
I am new to Java.
Id like to know if I can use system commands in Java applications. Thanks in advance,
Jan
Read the API doc for Runtime.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
here is output
•
•
•
•
[jan@localhost hello]$ javac helloJava.java
----------
1. ERROR in helloJava.java (at line 7)
System("xmms");
^^^^^^
The method System(String) is undefined for the type helloJava
----------
yup, that's not the way to call things outside the JVM...
Of course not, as there is no platform independent way to do it at all (except for pulling the powerplug, and that's assuming there's no UPS attached).
•
•
•
•
Is there even a portable, cross platform way to perform a reboot in java?
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
- Differences Between Java and C/C++ (C++)
- OS programming in Java? (Java)
- two Java GUI problems - please help (Java)
- Security Settings -> Java permission -> Custom (radio button) -> Java Custom Settings (Web Browsers)
- help required for implementing project using JAVA & XML (Java)
Other Threads in the Java Forum
- Previous Thread: Java III help needed to be done !!!
- Next Thread: Where did I go wrong??
| Thread Tools | Search this Thread |
Tag cloud for Java
addressbook android api apple applet application arguments array arrays automation binary bluetooth button calculator chat class classes client code columns component converter database draw eclipse error errors event exception file fractal ftp game givemetehcodez graphics gridlayout gui helpwithhomework html ide image inetaddress input integer j2me japplet java javaprojects jme jmf jni jpanel julia link linux list loop map method methods midlethttpconnection mobile netbeans newbie number objects openjavafx oracle php print problem program programming project projects recursion rim scanner screen server set signing size smart sms socket sort sql storm string support swing test threads time tree unlimited variablebinding webservices windows






