5
Contributors
8
Replies
9
Views
10 Years
Discussion Span
Last Post by Infarction
0

Hi,

I am new to Java.

Id like to know if I can use system commands in Java applications. Thanks in advance,


Jan

Sure

System.out.println();

:lol:

0

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
----------

0

yup, that's not the way to call things outside the JVM...

Is there even a portable, cross platform way to perform a reboot in java?

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).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.