This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Applets and the fly likes Applet code attribute unable to find the .class file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet code attribute unable to find the .class file" Watch "Applet code attribute unable to find the .class file" New topic
Author

Applet code attribute unable to find the .class file

haripriya vedula
Greenhorn

Joined: May 31, 2008
Posts: 24
Hi,

I am new to applets. I created a HelloWorldApplet by selecting a java project in eclipse and output(compiled classes are under prj/bin/ folder.

When i am calling applet class from html its unable to find the HelloWorldApplet .class file.

My code of snippet is as follows:

<APPLET CODE="HelloWorldApplet.class" WIDTH=500 HEIGHT=50>
</APPLET>

Can anyone help me where i am wrong.

Thanks,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
The .class file must be in the same directory as the .html file (unless the class is part of a package, in which case the package root is the directory where the .html file is in).


Ping & DNS - my free Android networking tools app
haripriya vedula
Greenhorn

Joined: May 31, 2008
Posts: 24
Thank you !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Applet code attribute unable to find the .class file
 
Similar Threads
Calling an Applet from JSP
Applet tag in a servlet.
Another java.lang.NoSuchMethodError: main error
appletviewer window never pop up
applet help please