Java/Javascript are platform agnostic. MOST new security vulnerabilities are written to target multiple platforms through languages used across platforms such as Java.
Java and Javascript are two different things. Apple OS X does not come with Java pre-installed. A users has to download and install Java from Oracle if he or she (or it, these days) requires Java for some specific application. Other wise any Java application would not run. The more limited Javascript is an option that can be turned off in Safari by turning off a radio button in Safari Preferences. Javascript would only run inside the sandboxed Safari App and would not have access to any data from other apps.
I’ve always warned friends about JAVA.. and hate it with a passion...