1

I'm trying to access a local HTML page that contains a Java applet on my Windows machine with Firefox. I'm aware of the security implications, so I don't need a lecture about that. The page is from a trusted source...

The problem is that the Java Control Panel only allows "Very High" or "High Security," and does not allow file references in the Exception Site List. Does anybody know how am I supposed to get Java Applets to work locally?

Java Control Panel Firefox running local web page

2
  • If it's a local file anyhow, why not just run it as a Java application instead of embedding it in an HTML file? Also, the schema for a file: URI is basically just file://; they don't usually have host/domain names (the way HTTP/HTTPS URIs do) and the third slash is the path separator; you can add it but it shouldn't be needed here (nor anything after it, like the C:, unless you're going to supply the full path to your file).
    – CBHacking
    Commented Feb 9, 2017 at 1:58
  • Also, does it need to be Firefox? I think IE's applet security rules are a little more flexible, though you'll need to change the defaults to make it work on local files with IE, too.
    – CBHacking
    Commented Feb 9, 2017 at 1:59

1 Answer 1

0

Use appletviewer.

  • Step 0: Install appletviewer (comes with JDK).
  • Step 1: Inspect the html source of the page that is loading the java applet. Look for <applet archive=... code=..>
  • Step 2: Extract entire content of <applet ..> ..</applet> and save it to, say, applet.html
  • Step 3: Recursively download all .jar or .class files mentioned in the applet. Make sure to keep the same directory hierarchy
  • Step 4: Run the applet as: appletviewer applet.html

If the applet fails to run, look for any errors on the console, such as load: class ABC not found and resolve those.

More details: https://docs.oracle.com/javase/10/tools/appletviewer.htm#JSWOR-GUID-D385C593-0309-42CA-AA79-F98046A1BAA7

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .