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:
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
whatever happened to trying?
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Is there even a portable, cross platform way to perform a reboot in java?
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
Read the API doc for Runtime.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
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).
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Look into the Runtime.exec methods, as masijade suggested
Infarction
Posting Virtuoso
1,580 posts since May 2006
Reputation Points: 683
Solved Threads: 53