If you're running Windows XP and you've applied Java7 update 15, and if your system is locking to the point where you have to force a shut down, I may have the solution.
I was experiencing this - the system would boot, then lock as soon as it was done loading.
I had to use another computer to download two things: SafeMSI (extract from zip), and Java7 update 3. I copied them to a flash drive. (Oracle will require a logon to a free account in order to get J7u3 from them.)
I then put the flash drive into a USB port of the affected system and boot up the laptop. Once logged on in Safe Mode, I ran (from the flash drive) the SafeMSI which will get Windows Installer working in Safe Mode; and then uninstalled the Java7 update 15, following immediately with the install of Java7 update 3.
Reboot, and I haven't had a problem, since.
Hope this helps.