File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes My java applet program does not appear in appletviwere!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "My java applet program does not appear in appletviwere!!!" Watch "My java applet program does not appear in appletviwere!!!" New topic
Author

My java applet program does not appear in appletviwere!!!

Lolo Mohammed
Greenhorn

Joined: Mar 17, 2011
Posts: 13

Hi,

I write a java applet program in netbeans IDE. But when i test it in appletviwere it does not appear and give me errore as in the picture.

My html file contains:



What is the problem??

Thank you.... .





[Thumbnail for appletviewer.JPG]

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
In the future, please do not post screenshots of error messages - post the error messages as text so that they're searchable.

It looks as if the applet class is part of a package; the APPLET tag's code attribute must reflect that.


Ping & DNS - my free Android networking tools app
Lolo Mohammed
Greenhorn

Joined: Mar 17, 2011
Posts: 13

when i chang the APPLET tag to

<applet code="OthelloGame/OtheApplet.class" width="600" height="500">
</applet>

It give me this error:

load: class OthelloGame/OtheApplet.class not found.
java.lang.ClassNotFoundException: OthelloGame.OtheApplet.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:785)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
at sun.applet.AppletPanel.run(AppletPanel.java:368)
at java.lang.Thread.run(Thread.java:619)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
Is the file OtheApplet.class in a directory called OthelloGame which is at the same level as the HTML file? If not then you need to make it so.
Lolo Mohammed
Greenhorn

Joined: Mar 17, 2011
Posts: 13

it is work

thank you very much...

but why it must be out of the pakage folder???
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
That's just how Java works; see http://download.oracle.com/javase/tutorial/java/package/index.html for more information, particularly the section "Managing Source and Class Files".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My java applet program does not appear in appletviwere!!!
 
Similar Threads
Applet not shown in Eclipse internal browser.
applet not loading
Enabled Web start in NetBeans, but lost database connection
Deploying an Applet.
Internet Explorer 5.0 and Applets