some Questions

yea i need to know how to get seconds of a clock using JAVA i know aobut the calendar function but it errors out and also if there is a way to reboot/turn off the computer through Java like VB 5.0 can do
[210 byte] By [CGfreak102a] at [2007-11-27 2:22:31]
# 1
Next time please use a more descriptive subject line. And what do you mean "errors out"? As for the "can java reboot your system like VB 5 can", the answer is no.
tsitha at 2007-7-12 2:26:54 > top of Java-index,Java Essentials,New To Java...
# 2

> yea i need to know how to get seconds of a clock

> using JAVA i know aobut the calendar function but it

> errors out and also if there is a way to reboot/turn

> off the computer through Java like VB 5.0 can do

You should be able to use Calendar to get the current number of seconds (not sure why, but you can). If errors are occurring, what does the stack trace look like? Are you getting compilation errors or runtime errors?

In terms of rebooting the computer, if a Windows API function provides it, you can use the Java Native API to invoke that function. However, I would caution you against writing a program that automatically reboots a computer (most users would consider this a 'bad thing'). Also, if you want to write native Windows code, Java is probably not the best language to choose. VB and C would be more logical alternatives.

- Saish

Saisha at 2007-7-12 2:26:56 > top of Java-index,Java Essentials,New To Java...