How to Play Games Which Are Really Old Java Applets

backwards compatibilitytechnical-issues

I wanted to take a trip down memory lane and play a browser game from when I was in school. It turns out that game a Java applet. I changed my security settings so that I could play it and now it attempts to load, but it crashes instantly. I'm guessing this is because it runs on an old version of Java which is incompatible with the version on my machine.

I would like a general answer about techniques to play old Java Applets in general. But I am specifically trying to play Heavy Cannon which appears to be from 2003. I have the 64-bit and 32-bit versions of Java 8, Update 20 (1.8.0_20) installed. The error I get is ClassFormatError: Name index 0 in LocalVariableTable has a bad constant type in class file hc. I get this error in both Chrome and Firefox.

It looks like if I want to go back in time and recreate a 2003 browsing experience I need to run Java 4 with Phoenix 0.5 (an old version of Firefox) on Debian 3.0. I tried to create a virtual machine in Virtual Box set up like this, but I couldn't get through the OS install. That could be user error or it might be complex/impossible to set up old OS's on Virtual Box.

I have also tried running the oldest versions of Firefox Portable (version 2.0, which has Firefox 5) and JPortable (which has Java 6, Update 23). All applets would not load because a plugin (ie, Java) performed an Illegal Operation).

I am trying to avoid installing an old version of Java directly on my machine if at all possible. It does not seem trivial to switch my browser between the old and new versions and I don't know what kind of compatibility problems it will create. But if anyone has success with this method I am all ears.

Best Answer

First Solution:

The best solution I found was to duplicate a browsing experience from about 2003 in a virtual machine. I tried Debian 3.0 first and was not able to get it working, though I'm sure it is possible for someone with more experience. I then tried Windows XP because I found out you can get an XP virtual machine without a license for browser testing. Here are the instructions I followed. I then installed Java 5, Update 22 from Oracle. This requires registering with Oracle. After Java installation I had to reboot the virtual machine because IE6 was crashing (unsure if related). The game then ran perfectly.

Thanks to @WindowsEscapist for suggesting I try an XP virtual machine or I never would have looked into it.

Second Solution:

I used Browser Studio to build a browser with Firefox 2.0 (the oldest version of Firefox they had available) and Java 5, Update 14 (the oldest version of Java they had available). This also required downloading a Spoon plugin. The game just worked on the version of Firefox built by Browser Studio.

Unfortunately, you can only play for ~10 minutes on the trial version. It costs $20 a month to subscribe. This is a much lower effort solution, but it comes at a price.