Directory is like so:
test.html
blah
hmmm
Inside “blah” we have all the applet files, including blahBlah.class. Inside “hmmm” are a few more more class files that were taken from a library or something, they are used by the project also.
I write in test.html…
<applet name="blah" code="/blahBlah.class" codebase="blah"></applet>
(along with every other variation I could think of)
Farthest I’ve gotten is:
java.lang.NoClassDefFoundError: blahBlah (wrong name: blah/blahBlah)
Now inside blahBlah.java, we have:
package blah;
I’m not sure if it’s related.
Also wondering if it may be necessary to place the project in a jar file and set the archive attribute of the applet?
The real files are not blah and blahBlah, but I’ve replaced the names faithfully.
This basically means that it’s been executed as
instead of
In other words, your
codeattribtue is wrong. It has to beor just by FQN (see also Andrew’s comment)
The
codebasedefaults to the current folder, which is fine in this case, so it’s removed. An alternative is to put it in another folder, such as/appletor something. You should at least not use a package folder as code base, but instead the package root.