Is your class in the right subdirectory according to its package name? Are you taking the package into account in the HTML code?
The class is in a package. Therefore the correct class name to use on the code= attribute should include the package name.
The simplest solution is to remove the package statement.
If you keep the package you need to place the class file in a folder that is in the path for the package relative to where the html file is.
When i take the Package away, it works if i run the build HTML file instead of the src HTML file. I have 2 questions:
1: what is the difference between these two files? When i edit my HTML in NetBeans, which one am i changing?
2: if i want to use a package, how can i specify in the path? i tried this, but it didn't seem to work.
I want to point to the .class that is in the "build" folder right? sorry if these are really newbie questions, i am if you haven't guessed, quite new at all of this.
<APPLET code="com.FirstApplet.RunApplet.class" width=350 height=200></APPLET>
Thanks for the quick reply!!
Please copy the error message from the browser's java console.
it didn't seem to work.
The .class is not part of the class name for the code= attrubute.
Using the package: com.FirstApplet the com folder should be in the same folder as the .html file.
Sorry, I don't know how IDEs work. I use an editor.
When i edit my HTML in NetBeans
Sorry, Norm, the .class *is* required in the <APPLET code=
Originally Posted by Norm
This is copied from a page I have on Google Sites
<applet code = 'RedirectApplet.class'
archive = 'https://sites.google.com/site/.../redirectapplet.jar',
width = 570,
height = 25>
<PARAM name="codebase_lookup" value="false">
It may work sometimes and not others. I have not kept track. Have you tried it without it? I never add .class and have no problems.
.class *is* required in the <APPLET code=
I have seen many errors where the jvm can not find a class named xxx.class. To correct the error I have the op remove the .class and it works. If the class is not found the message would say: class xxx not found.
Yay! i got it to work! I had the HTML file in the incorrect place. Thank you guys for your help!
Also, it worked with and without the ".class" added to the end.
Hey, sorry to ask this here, but How do I mark this as solved?! i can't seem to find the option. I know this question doesn't belong here, but I didn't want to start a completely new thread just for this. Thanks!