Whenever I run my applet, I get the error ClassDeffNotFound
or something like that. There is no error is in the code, code is fine. Issue is with how I called to the applet using HTML. I am using the following:
<applet code="Form.class" width="486" height="712"></applet>
This is when the HTML file is directly inside the applet folder. The applet works 100% fine in this case
Now this one
<applet code="Calculator\src\Form.class" width="486" height="712">
This is when the HTML file is in the root folder. But this case, it is always giving ClassDeffNotFound
!
My HTML file should be in the root folder while the applet should stay in folder dedicated to it. But, unless I place the HTML file inside the applet folder, it is errors.
Why is this?
If the applet class is located in Calculator\src
folder relative to the HTML file then the applet tag should include the codebase
attribute:
<applet code="Form.class" codebase="Calculator/src" width="486" height="712">
Although it's very unlikely that the class file will be stored in the projects src
folder. This is typically the bin
folder.