Salam alleikum Ante, I think that with disk activity caused ny LW your computer is overheating and thus restarting. You might want to get more cooling in your PC case with fans over the CPU/motherboard. Do you have a temperature sensor to monitor the heat?
I don't see what else it could be.
As for Java,
http://java.sun.com/j2se/1.5.0/download.jsp get the JRE, not the SDK
Ciao