|High CPU usage can cause that issue. Check your running processes to see if anything jumps out at you.|
In the meantime you don't indicate when this happens but because you mentioned Java I am guessing it is when you are using the internet.
I suggest you download and run the cleaner module of Ccleaner Slim from the link below. When running the cleaner module you may need to re-enter passwords for some sites. There is an Options button which you can use to exclude cleaning certain cookies you want to keep.
The simple method to determine which entries you need to exclude is to run the cleaner then go to any sites that you need to re-enter passwords for. Immediately leave each site and close the browser. Then use the cleaner Analyzer button. Go to options and the entries should be there for you to exclude. You only need to do that once for each cookie you want to exclude.
Cleaning temp files and cookies may solve your mouse issues.
The registry module is safe to use and you will also be asked if you want to backup the registry. To make you feel more comfortable with running the registry module I suggest you select yes. Save the backup to the desktop where it is easily accessible and can be easily deleted after a few days with no issues.