CS 201 - Enabling Applets in your browser

Most browsers have discontinued support for Java applets. Here are instructions for how you can still run Java applets. One method is to run them using the Java JDK's appletviewer from the commandline. The other is to use browsers that still supports applets (Internet Explorer on PCs, and Firefox v52.9ESR on Macs), and configure them to allow running applets on our course page.

Using appletviewer

If you have the Java SDK installed (i.e., you can run "javac" from the command line), you can also run applets directly from the command line using the tool "appletviewer". Go to the web page containing the applet and copy the URL, then run appletviewer with the URL as command-line argument. For instance, to run the Buggle applet from lecture 5, type:
appletviewer http://www.cs.middlebury.edu/~schar/courses/cs201-f18/examples/Buggles/

Using the browser on a PC

On a PC, Internet Explorer still supports running applets. Start IE and continue at "Enabling Java" below.

Using the browser on a Mac

If you have an older version of Safari (11 or earlier), you can use Safari. If you have Safari 12 you'll have to install and use Firefox 52 ESR. See for instance this post.

Download Firefox 52 ESR from the official site or download this local copy.

Install Firefox by dragging the icon to the Applications folder. If you already have a newer version, select "keep both" and it will likely save this older version as "Firefox2".

After installing, it is important to (quickly) disable updates within the Firefox preferences or it will update to a newer version that also doesn't support Java. Start Firefox, go to Preferences (Apple-comma), then Advanced, select the Update tab, and click on "Never check for updates". This is a security risk, so don't use this version of Firefox for general web browsing, only for our course page.

Enabling Java

After starting a browser that supports Java, head to www.java.com and download Java. Note that this is a different Java than the Java SDK you downloaded earlier in the semester. When in doubt, click on "Do I have Java?" and follow the instructions.

Firefox users: Ignore the yellow box and look at the line underneath ("Firefox 52 ESR users"). Click at "click here".

If you see a gray box, click on Activate Java. Click on Allow and Remember. If it asks you to upgrade Java, go ahead and upgrade. But do not allow it to "uninstall older versions" of Java since that might uninstall your Java SDK.

If successful, you should see "Congratulations! You have the recommended version of Java installed."

Enabling Applets on our course page

The final step is to convince Java that our CS 201 applets are safe (they are!). The applets on our course page are considered "untrusted", so we need to add them to an "exception list". To do this, open the Java Control Panel:

Mac: Open System preferences, and click on Java

PC: From start menu, search for "java". Select "Configure Java".

Once the Java Control Panel is open, click on Security tab.

Finally, for the changes to take effect, you'll have to close and restart your browser.

To test it, navigate to one of the applets on our course page (e.g., "Buggles" from lecture 5). If you get a warning "plug-in blocked", select "enable the plugin". When prompted "always allow for cs.middlebury.edu", say "yes".

Hopefully it will work now! If not, please come see me.


For PCs, more information on how to enable Java in various browsers under Windows can be found here.