What browser? What version? What buttons? A screenshot would be helpful.
Java can run inside a browser window but the browsers actual forward/backward/etc buttons aren't java.
It could be a virus, try this:
Download TDSSKiller and RKill from our
Freeware DB. If you do not have an anti-virus then download, install, and allow to update Malwarebytes Anti-Malware (MBAM). Then reboot your system into safe mode without networking (Reboot and, when it says "Starting Windows," Press F8; If you get a message asking continue in safe mode or perform a system restore, choose continue in safe mode). Now run TDSSKiller and after that run RKill and after that run a full virus scan. The first two will take maybe 5 minutes each but a full virus scan can take anywhere from 30 minutes to several hours depending on your hard drive size and number of files.
TDSSKiller is designed specifically to look for rootkits. RKill is designed to stop the stealthing programs that hide/protect/regenerate some nasty viruses. Running these first will help ensure your A/V has the absolute best chance of cleaning up infected files
It could also be problems with add-ons, try running the browser w/o add-ons.
Uninstall any useless toolbars that you never use.
Run a product like CCleaner to clear out the cache, history, temp files that could be slowing the browser down. I recommend running CCleaner every month or two.
It could be other things but I would try those first to see if it helps.