Looking at Safari > Preferences > Security you might be puzzled. You’ve heard we need to protect our computers from the latest Java exploit by unchecking “Enable Java” and “Enable Plug-ins.” Maybe you've already checked to “Block pop-up windows” and “Enable JavaScript.”
A Google search for the difference between Java and JavaScript brings up some websites. See http://www.htmlgoodies.com/beyond/javascript/article.php/3470971/Java-vs-JavaScript.htm Written by the co-author of a JavaScript Primer Series, Joe Burns explains the similarities and differences.