Java security setup for Windows 7

This article describes how to set up Java security for browsers on a Windows 7 system. Java Security configuration is required to enable you to execute unsigned Java applets. Java will automatically execute signed applets, but these have to signed using a cryptographic key contained in a signing certificate, which has to be purchased from a certificate authority and renewed regularly. This is usually not appropriate for simple applets used for graphical applications, so security configuration is now inevitable.

  1. If you really want to be ahead of the curve you can first install JRE 8u20 (Java Runtime Environment version 8) from https://jdk8.java.net/download.html. Otherwise skip this step. (The version 8 JRE is required if you intend to use the 3D graphics support of JavaFX.) Unless you intend to compile your own Java programs, you only need to download the JRE file. Before downloading, select the Accept License Agreement button. If you are using the Firefox browser, you should download the 32-bit JRE, as Firefox does not yet support 64-bit programs. The JRE file will be named something like jre-8u20-ea-b23-windows-i586-dd_mmm_yyyy.exe (where dd_mmm_yyyy is the publication date). Download and execute this file to install the JRE. (The JRE contains the Java Virtual Machine [JVM], the java console command, and the browser plugins. It does not contain the Java compiler itself, which requires the full Java Development Kit [JDK]).
  2. Now, go to http://java.com/en/download/installed.jsp to ensure that you have the most recent Java installed.
  3. Press to accept the Java license terms.
  4. This button runs a Java applet itself. (I presume it is a signed applet, as it does not appear to require security configuration.)
    If you see the following prompt, select the button. (You should probably also set the Do not show this again... checkbox.)

    When the applet completes, you should see something like:

    If you do not see either of the above, the applet may be being blocked by the browser's plugin controls. See further at point 13.

  5. To run any further applets, you now need to configure Java security. This is not done in the browser: it is a Windows operating system configuration.
  6. Go to the Windows Control Panel screen, and select Java. You should see the following Java Control Panel:
  7. In the Java Control Panel, select the tab. You should see the following:

    Ensure that the Enable Java content in the browser checkbox is set, otherwise Jave applets will not execute at all.

    For earlier Java versions, you may see a security level of Medium. Do not use this, as it is deprecated. Use the Exception Site List process, described below, instead.

  8. You now have to configure the locations from which you are prepared to accept downloads of Java applets. The locations are always specified as full or partial URLs. URLs with schemes http, https, and file are accepted. (See The components of a URL, written under my guidance, for an excellent description of the components of a URL.)
  9. To configure the Exception Site List, press the button in the Java Control Panel Security tab. This should display something like:
  10. Add new URLs by pressing the button. Type or paste-in the new URL, then press .
  11. For http and file scheme URLs, one of the following warnings is issued:

    You must accept the risk by pressing the button in each case. My personal view is that the risk of file and http scheme URLs is no greater than that of https, as it is just as feasible to deliver a rogue applet over HTTPS. It is also illogical: anyone who can afford an SSL certificate to run an HTTP server is also likely to be able to afford a certificate to sign the applets, thereby making the security configuration unnecessary. But those are Oracle's rules.
  12. Once you have created the Exception Site List, it should now be possible to execute applets (from those named locations) in a browser. But the browser plugin will still issue additional prompts to confirm that you wish to run the applets.
  13. Even after Java Security has been configured, you may still not be able to execute applets. This is because the applets are executed by means of a browser plugin, and the execution of plugins is now tightly controlled by the browser itself. This is not part of Java security: it is part of the browser plugin security. It applies to other plugins like the Adobe's Shockwave Player or Apple's Quicktime Player.
  14. If an applet is blocked in Firefox, you will see a graphic like the following instead of the expected applet:

    The clickable line below the Lego piece says Activate Java Platform followed by the installed Java release. When you click on this, you should see the following popup in the top left-hand corner of the Firefox window:

    Press the button to allow the Java plugin to run, and to remember the decision for future invocations of the applet. Under some circumstances it may be necessary to stop and restart Firefox several times before Firefox accepts the plugin security choice.

  15. When the Java applet finally runs, it will create a Java Console window, which logs the actions taken by the Java program. This can be ignored and closed if you wish.

Acknowledgements

Oracle® and Java® are registered trademarks of Oracle and/or its affiliates. Windows® is a registered trademark of the Microsoft Corporation. Firefox® is a registered trademark of the Mozilla Foundation. LEGO® is a trademark of the LEGO Group of companies Other names may be trademarks of their respective owners.

The graphics are all screen captures from Java running on Firefox on Windows 7. They are therefore presumably Copyright © Oracle Corporation, Copyright © Mozilla Foundation, or Copyright © Microsoft Corporation; but they are used without explicit permision. The text is Copyright © Peter Havercan 2014.

Creative Commons Licence Java security setup for Windows 7 by Peter Havercan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.