Hi ,
I want to change the system date using java/jsp . i am using linux system .
public class LinuxJava {
public static void main(String[] args) {
try {
String command = "date 07212008";
final Process process = Runtime.getRunt ime().exec(comm and);
// int returnCode = process.waitFor ();
// process.toStrin g()
System.out.prin tln("Return code = " + process.toStrin g());
} catch (Exception e) {
e.printStackTra ce();
}
}
}
i tried this code it didn't change the code . can any one tell how to change the system date with java application ?
I want to change the system date using java/jsp . i am using linux system .
public class LinuxJava {
public static void main(String[] args) {
try {
String command = "date 07212008";
final Process process = Runtime.getRunt ime().exec(comm and);
// int returnCode = process.waitFor ();
// process.toStrin g()
System.out.prin tln("Return code = " + process.toStrin g());
} catch (Exception e) {
e.printStackTra ce();
}
}
}
i tried this code it didn't change the code . can any one tell how to change the system date with java application ?
Comment