Yes. It's called a Java Drive-Bye. Basically it downloads keyloggers and other stuff you don't want onto your comp. The only Java DL's you should be clicking are the ones from Runescape.
This happened to me a few times. Had to run Malware-Bytes to get ride of them.