How do i restart main class?
I've created irc socket bot and want to restart the program after closing the stream and socket.
Thank you
Printable View
How do i restart main class?
I've created irc socket bot and want to restart the program after closing the stream and socket.
Thank you
If you main( ... ) method looks like this now:
... change it to this:Code:public static void main(String[] args) {
// a whole lot of code here that doesn't belong here to start with
}
kind regards,Code:public static void main(String[] args) {
while(true)
doWork(args);
}
private static void doWork(String[] args) {
// the entire bunch of code here ...
}
Jos
What command should i put to restart it? :confused:
Thank you