Skip to Main Content

Bad Applet class exception when launching an applet in java 1.7 and 1.8

2952775Feb 10 2016 — edited Feb 10 2016

I am using java 1.8_20 version. I am using java instrumentation to override few of the classes at runtime. To work with instrumentation, we should load all the required jars with boot-strap class loader. In that required jars, few of the classes are extending Applet class.

So, when I am loading a class which is extending Applet class with boot-strap classloader, getting below exception

 ExitException[ 3]java.lang.SecurityException: Bad applet class name at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source) at sun.plugin2.applet.Plugin2Manager$ Source) at Source).

And I came to know that when ever we tried to load a class which is extending Applet class with boot-strap class loader or extension class loader, we will get this exception in java 1.7 and 1.8 versions due to restrictions/security on applets.

Can any one suggest me how to resolve this exception?

Post Details
Added on Feb 10 2016