Can someone please show me how I can use/install a java applet I downloaded to work with my browser (firefox). The applet is that I got from this link:

I have installed openjdk using:

sudo apt-get install openjdk-8-jdk

And tried to compile by:


which gave me loads of error messages that mean nothing to me. Here it is:

javac error: class BigNumCalc is public, should be
declared in a file named public class BigNumCalc 
       ^ Note: uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: uses unchecked or unsafe operations. Note: Recompile
with -Xlint:unchecked for details. 1 error

I am sure this java program is bug-free and should work flawlessly. In any case should I be compiling this at all before I can use it as a plugin? And how do I use it as a plugin.

Update: I have also installed icedtea as suggested by Byte Commander:

sudo apt-get install icedtea-8-plugin

and checked it in firefox preferences and it is there and active.

When I File/Open the in firefox it simply offers to save the file!

I badly need a step-by-step insrtructions to install this applet. Thanks

  • That source code is from the year 2000. Something has probably changed in Java that prevents it form compiling. – Android Dev Oct 24 '16 at 16:28
  • what about the process? should it be compiled before it can be used as an applet? – elmclose Oct 24 '16 at 18:19
  • Yes, code must be compiled before you can run it. (The notable exceptions being scripting languages, like Bash) – Android Dev Oct 24 '16 at 20:42
  • Thanks for that. Sounds like we are not going to get anywhere with this. Let's not waste any more time on this useless program and close this thread. – elmclose Oct 25 '16 at 9:49

A .java file is a Java source code file, which is a plain text document. It is not executable.

To run it, you would have to install a JDK (Java Development Kit) like the openjdk-8-jdk package, if you don't have one already:

sudo apt-get install openjdk-8-jdk

After that, you can use the Java compiler javac to compile the source code file to a byte code .class file:


After that, you can run the compiled BNCApplet.class file using the java command, but without the .class suffix:

java BNCApplet

Further reads about how to compile and run .java files on Ubuntu:

I'm not 100% sure, but this way Applets should run in a separate Applet Viewer window. To be able to run Java Applets in your browser if you use an OpenJDK Java implementation, you need the additional IcedTea package that provides a browser plug-in for Firefox-like (NPAPI) browsers. Oracle Java already includes this plug-in.

To install the plug-in for OpenJDK 8, run:

sudo apt-get install icedtea-8-plugin
  • I installed openjdk as you suggested and tried compiling -- this is how it went: $ javac error: unmappable character for encoding UTF8 Copyright � 2000 Arnold G. Reinhold, Cambridge. MA USA ^ 1 error -- (the hat sign points to the character before 2000) – elmclose Oct 22 '16 at 16:03
  • Please edit your questions to provide this information, comments are not well suited for output, as they don't preserve formatting. They also might be deleted for several reasons. And the issue you're pointing out has something to do with the character encoding of the Java source code. The easiest fix would probably be to to open the file in a text editor and remove that offending character, probably it's a © somewhere in a comment line or in a string, which shouldn't affect the program. – Byte Commander Oct 22 '16 at 16:52

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.