JavaScript was originally developed by a different company (Netscape) under a different name (LiveScript). Note that Java has nothing to do with JavaScript, which is another language used to develop websites and apps. It's the 'client-side' Java running via web browser plug-ins that is not safe. Many companies have used the Java language to develop business applications that run on servers, and this 'server-side' Java is safe. If you are a business user, you may not have a choice. If you are a typical home user, you can probably do without it. I think everyone should uninstall Java from all their PCs and Macs, and then think carefully about whether they need to add it back.
Should I really remove Java from all my Windows 7 machines running MSE and Chrome?