aspose 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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 39547
    
  27
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 - updated with new look and Ping home screen widget
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: 39547
    
  27
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: 39547
    
  27
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".
 
wood burning stoves
 
subject: My java applet program does not appear in appletviwere!!!
 
Similar Threads
Applet not shown in Eclipse internal browser.
applet not loading
Internet Explorer 5.0 and Applets
Deploying an Applet.
Enabled Web start in NetBeans, but lost database connection