Java and Safety
A supplement to FirstGlance in Jmol. Created February, 2013. Updated September, 2017.


What is Java?

Java is the pre-eminent cross-platform computer programming language. Programs written in Java, such as Jmol (both the applet and the application) operate identically on popular computer platforms such as Microsoft Windows®, Apple Mac OS X®, and linux. This contrasts with programs written in other languages (such as the Firefox web browser, Microsoft Office®, or OpenOffice.Org) for which a different implementation of the program is needed for each platform.

Java vs. FirstGlance

FirstGlance in Jmol defaults to using JSmol, which does not require Java. FirstGlance in Jmol has operated with JSmol since early 2014.

Prior to version 2.7, FirstGlance in Jmol encouraged using Java, namely the signed Java applet Jmol_S, instead of JSmol. There was a checkbox to use Java near the box for entering a PDB code, and an option to switch to Java in the Preferences Tab. These options were removed in version 2.7 because the Chrome, Firefox, Edge, and Opera browsers no longer supported Java, and Oracle (the maker of Java) planned to discontinue browser-based Java.

However, if you choose a Java-compatible browser (see next section), you can still use Java. After you have displayed a molecule in FirstGlance (using JSmol), manually type &java onto the end of the address of FirstGlance in your browser, and then press Enter.

You are unlikely to need Java. However, if you plan to work with very large molecules (>25 thousand atoms) or NMR ensembles, the Jmol_S Java applet will have better performance than JSmol.

Installing and enabling Java.


Here are instructions, for Windows and OS X, and all popular browsers, for
Installing and Enabling Java.



Java is a security threat.

Java has historically had flaws enabling criminals/vandals to commit identity theft and to compromise computers. Simply visiting a malicious website with a java-enabled web browser can compromise your computer.

According to a January, 2013 article:
" Java was responsible for 50% of all cyberattacks last year in which hackers broke into computers by exploiting software bugs, according to Kaspersky. That was followed by Adobe Reader, which was involved in 28% of all incidents. Microsoft Windows and Internet Explorer were involved in about 3% of incidents, according to the survey. "
In January, 2013, the US Department of Homeland Security issued a warning recommending that Java be disabled in web browsers. For a few days at the end of January, 2013, Apple blocked the use of java in web browsers on Mac computers worldwide. This was a major inconvenience to some, but clearly Apple felt the security risks were quite serious. Oracle, the company providing Java, subsequently fixed some of the vulnerabilities in Java (and Apple re-enabled Java on Macs), but most likely other security risks remain.

How to keep your computer safe.

If you wish to use Java, how can you minimize your risk?
  1. Whenever an update for Java is available, install it. To confirm that you have the latest Java, visit java.com, click on the link "Do I have Java?" and then on the button "Verify Java".

  2. Do not visit unfamiliar websites. Especially do not click on unknown links or attachments in emails that you receive from sketchy senders. Also be careful when clicking links in google searches.

  3. Disable java in the web browser that you use for general-purpose browsing, email, google searches, etc. Here are instructions for disabling java in a particular browser. Use a different browser for resources that require Java.
      Windows users: Due to a limitation in Internet Explorer, you should use Internet Explorer for java. Use a different browser such as Firefox or Chrome for general web browsing, and disable java in that browser.
    These recommendations were made by Michael Horowitz in his Defensive Computing Blog in his January 2013 post How to be as safe as possible with Java.