Troubleshooting/Java Problems

From Jmol
Revision as of 00:26, 26 October 2009 by EricMartz (talk | contribs) (Clearing the Java Cache Using OS X Terminal: adding instructions)
Jump to navigation Jump to search

Java Control Panel

A few operations will need to use the Java Control Panel. This is installed in the computer separately from the browser or any programs. Here is how to reach it[1]:

  • Windows:
  1. Click on the Start menu
  2. Select Settings
  3. Select Control Panel
  4. Select Java or Java Plug-in (if you don't see it, go to Other options in the left panel or change to Classic View).
  • Windows (another method):
  1. With the web browser open, look for a Java icon in the taskbar (lower right of the screen; it will or not be there depending on your browser and whether you have opened a page using Java applets)
  2. Right-click on that icon
  3. Select Open Control Panel
  • MacOS 10.5: (This is known to apply to OS 10.5.8 with Java 1.5.0_20)
  1. Go to the Applications/Utilities directory.
  2. Double click on Java
  • MacOS: (This may still apply to OS 10.4 or earlier, or to obsolete versions of Apple Java)
  1. Go to the /Applications/Utilities/Java directory.
  2. Open the Java x.xx Plugin Settings application (x.xx is your plugin version).
  • Linux:
  1. Run the Java Plug-In Control Panel executable:
(JRE installation directory)/bin/ControlPanel
or load the Control Panel applet page with a web browser:
(JRE installation directory)/ControlPanel.html

Java console

The Java console collects messages and errors during operation of Jmol. When something does not work (e.g. a file does not get loaded, or a script is not completed), that's a place to look for the source of trouble.

Note: the Java Console is different and separate from Jmol's script console.

Depending on your operating system and browser, the way to access the Java console varies. Here are some of the access routes:

  • For the Jmol application, use the top menu: Help > Jmol Java Console
  • For the applet:
    • Look in the browser menu Tools > Java Console (Firefox, Internet Explorer), or Tools > Advanced > Java Console (Opera).
    • Look for a Java icon (a cup of coffee) in Windows taskbar (lower right of the screen); right-click on it and choose Open Console (Firefox and Internet Explorer in Windows).

Java cache

Applets in web pages visited are cached by the browser into a Java cache space in local disk (different from the browser's cache). This allows a faster response when the same applet is used in another web page visited later.

However, on some occasions this may cause trouble. Namely, if you open a new web page that uses a different version of the Jmol applet, sometimes the browser will use the former applet version rather than the new one. In these cases, even closing and reopening the browser, or clearing the browser cache, may give no solution. Then, you will have to clear the Java cache manually.

Clearing the Java Cache using Java Control Panel/Java Preferences


  • First, reach the Java Control Panel (see instructions above).
  1. Click on the General tab or menu section.
  2. Under Temporary internet files, click on the Configuration or Settings button.
  3. Click on the Delete files button.

MacOS 10.5 (this is known to apply to Java 1.5.0_20 in OS 10.5.8)

  • First, reach the Java Preferences (see instructions above).
  1. Select the Network tab.
  2. If keep temporary files for fast access is not checked, the cache is disabled. If it is checked, continue.
  3. Click the button Delete Files.
  4. In the confirmation dialog, make sure that Applications and Applets is checked.
  5. Click OK.

Clearing the Java Cache Using OS X Terminal

In unusual cases, the procedure in the previous section fails to clear the Jmol applet from the Java cache in Mac OS X. This has been observed when the version of Jmol was rolled back to an earlier version at Proteopedia.Org.

The following procedure should only be attempted if you are confident that you can do it correctly. Errors in this procedure could inadvertently erase programs or data! Commands must be typed very carefully without errors. Back up your system before proceeding!

MacOS X (this is known to apply to Java 1.5.0_20 in OS 10.5.8)

  1. In Java Preferences (see previous section for how to open it), note the location where temporary files are kept. Typically, this will be /Users/your_account/Library/Caches/Java/cache.
  2. Open Terminal (Applications, Utilities, double click
  3. Type the following command in Terminal, in order to change to the Caches directory: cd /Users/your_account/Library/Caches, making sure to change your_account to your actual account name. Press Enter.
  4. Confirm that you are now in Caches by typing pwd (print working directory) in Terminal, and pressing Enter. The report should be /Users/your_account/Library/Caches. If it is not, repeat the previous step.
  5. Type the following command in Terminal: find . -iname jmolapplet*, and press Enter.
  6. Note the directories in which JmolApplet* files are reported, such as ./Java/cache/javapi/v1.0/jar.
  7. Change to the first directory in which JmolApplet files are reported, for example cd Java/cache/javapi/v1.0/jar.
  8. Confirm that you are in the desired directory using pwd. DO NOT PROCEED IF THERE IS ANY DOUBT.

Diagnosing Java - Javascript communication

This is a useful page for testing communication between Java applets and Javascript.

Google Chrome browser

This web browser (released Sept. 2008) is only compatible with Java version 6u10 (also named 1.6.0_10), or later. If the browser is up-to-date, it should direct you to the adequate download page automatically whenever you try a page with an applet. If not, search Sun's Java site for this version (currently in beta, or Release Candidate state), or go to full listing of Java downloads.