Note that there are some explanatory texts on larger screens.

plurals
  1. POApplet exception: java.lang.ClassNotFoundException
    primarykey
    data
    text
    <p>I have a folder with two files inside; the java .class file and the .html file. In my html file I call the .class file as an applet but it sais an error on the website its published to saying it can't find the .class file. This puzzles me since they are in the same directory and I triple checked for spelling errors. </p> <p>Here is my .html file...</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Applet&lt;/title&gt; &lt;/head&gt; &lt;body&gt; Program&lt;br /&gt; &lt;applet code="testing.class" width="300" height="300"/&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>and here is my .class file...</p> <pre><code>import java.awt.Color; import java.awt.Graphics; public class testing extends java.applet.Applet{ public void init(){ } public void paint(Graphics g){ g.drawOval(0,0,250,100); g.setColor(Color.RED); g.drawString("My Applet",10,50); } } </code></pre> <p>My .class file is "testing.class" and my html file is "testingpage.html"</p> <p>Here is the Full Entire error</p> <pre><code>load: class testing.class not found. java.lang.ClassNotFoundException: testing.class at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:252) at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:249) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:179) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:160) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:690) at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3045) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1497) at java.lang.Thread.run(Thread.java:680) Exception: java.lang.ClassNotFoundException: testing.class load: class testing.class not found. java.lang.ClassNotFoundException: testing.class at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:252) at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:249) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:179) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:160) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:690) at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3045) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1497) at java.lang.Thread.run(Thread.java:680) Exception: java.lang.ClassNotFoundException: testing.class </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload