How to Run Java Applet Program with New Versions of Java

If you have tried to run a Java applet program using your latest version of Java (later versions from Java SE 11 released on September 2018), you will have some errors because those versions from Java SE 11 don't support web Start applications or applets.

Even if you have an old version of Java with applet. Your browser will show show an error because Firefox and Chrome no longer support applets.

Older versions of Java had appletviewer to run applets. 

So How can you run Java applets if the browsers and latest versions of Java don't support them?

The appletviewer command allows you to run Java applet without a browser. But for the appletviewer command to work you need to install the older version of Java in your  PC.

So the doubt you have will be having will be what if you have the latest version of Java installed on your PC and don't want to replace it with an older version.

So the option we have is to have two versions of Java installed on your PC. To compile your applet program you need to use the older version and for all other Java programs you can use the new version you already have.

So you need to have multiple versions of Java installed on your computer.

Steps to run your Java applet using the older version of Java.

  • Extract the download rar file to the same location where the Java is installed on your PC. By default the location is C:\Program Files\Java . Now you will have two versions of Java on your PC.

  • Next you need to do some file renaming.
Inside the folder jdk-9.0.1. Open bin folder.

Rename the executable file javac to javacold.
Rename application java to javaold.

  • Set path for old version.
Copy the address of bin folder, by default C:\Program Files\Java\jdk-9.0.1\bin.

Right click on This PC, Go to properties.
Click on Advanced system settings. Select Environment Variables.
Select Path under System Variables and click edit.
Click New and paste the address of bin folder we had copied (C:\Program Files\Java\jdk-9.0.1\bin)
Click OK on all opened windows to This PC properties.

  • Now let's test if we can run a Java applet program
Create file which is a Hello World applet program.

Make sure that you have the HTML part as a comment in your code itself like in the program given above.

Compile the program in your terminal using javacold command.


After compilation you will get a message. Then run the applet using the command appletviewer.


Now you can see the Hello world applet running.


Java applet is not supported by Java as well as the browsers. So we need to use appletviewer command of older versions of Java to run an applet program.

I hope this post helped you to run your applet program successfully on your PC. If there is any questions or feed backs hit me up in the comments.

Jobin Jose


  1. thank you so much, it was of great help

  2. Thanks. By following this i have really solve my problem

  3. did this as mentioned in the instructions, even got the applet to display
    This is whats being shown when trying to run other applet based programs:
    Warning: Applet API and AppletViewer are deprecated.
    any way to get around this?

    1. you can ignore the warning and go ahead with the appletviewer command

    2. thank you so much..I was jumbled after seeing the warning but now I realize that you have to ignore some exceptions in your life in order to succeed.

  4. thanks aloads this helped me going through my applet codes....really appreciate your effort

  5. thank you.... my dear friend...
    keep going rock...