Look into using the Process class to execute a command you might use on the command line (DATE in your case). Small tutorial that you can use to get you started is at: http://java.sun.com/developer/JDCTec.../tt0304.html#1
You'll probably have to run this command with administrator privileges...not too familiar with Windows.
On a side note, if you use this approach, the example doesn't close any
of the streams that were opened to read the output of the command
issued. You should do this to avoid unwanted resource consumption.
golu_fixya
thanks
104 views
Usually answered in minutes!
×