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 Applet works in browser, but not in Appletviewer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet works in browser, but not in Appletviewer" Watch "Applet works in browser, but not in Appletviewer" New topic
Author

Applet works in browser, but not in Appletviewer

Tina Parks
Ranch Hand

Joined: Jun 30, 2001
Posts: 35
I have written my own applets, but Appletviewer won't display them. However, they look fine in my Netscape browser. Note:
1. Appletviewer DOES work with other applets, so it doesn't appear to be a problem with installation.
2. When running Appletviewer with one of my applets, I get the following:
________________
C:\Java> appletviewer my.htm
Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle sun.applet.resources.MsgAppletViewer, key appletpanel.badattribute.exception
at java.util.ResourceBundle.getObject(ResourceBundle.java:382)
at java.util.ResourceBundle.getString(ResourceBundle.java:382)
at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:42)
...and a mess more of similar messages.

Any ideas what it is complaining about? I can post the original source code if that would help. Thanks.
Deepak Yadav
Greenhorn

Joined: May 30, 2001
Posts: 7
Hi Tina
Check out the arguments of <Applet> tag. Might be you have not specified the right class name for 'code' attribute.
Deepak
Tina Parks
Ranch Hand

Joined: Jun 30, 2001
Posts: 35
Actually, I checked all the file names very carefully before posting.
For convenience, I decided to create a new folder. Once I dropped my files into the new folder the appletviewer suddenly began to work. Bizarre! (This folder was simply a subfolder of the original. I have no idea now what the problem was before.)
Neeraj singh
Greenhorn

Joined: Nov 14, 2001
Posts: 1
Tina,
i was getting the same error. Deepak is right. In my case, it was not the Html tags, but an extra comma
<APPLET CODE="HelloAgainApplet.class" WIDTH=250, HEIGHT=70>
once i took the comma after, "WIDTH=250" out
<APPLET CODE="HelloAgainApplet.class" WIDTH=250 HEIGHT=70>
the 'appletviewer' started working alright.
neeraj singh
 
Consider Paul's rocket mass heater.
 
subject: Applet works in browser, but not in Appletviewer