aspose file tools
The moose likes Beginning Java and the fly likes Problem Running Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem Running Applet" Watch "Problem Running Applet" New topic

Problem Running Applet

Azam Bukhari
Ranch Hand

Joined: Oct 03, 2000
Posts: 58
Dear Community, i am getting problem in running this damn soon as i press enter typing
the appletviewer blabla.htm on the prompt i got the following msg...
Is My JDK has gone Corrupt or i have to edit the path in autoexec.bat...
Help Me Please!!
C:\jdk1.3\bin>appletviewer my.html
Exception in thread "main" java.util.MissingResourceException: Can't find resour
ce for bundle sun.applet.resources.MsgAppletViewer, key appletpanel.badattribute
at java.util.ResourceBundle.getObject(
at java.util.ResourceBundle.getString(
at sun.applet.AppletMessageHandler.getMessage(
at sun.applet.AppletPanel.showAppletStatus(
at sun.applet.AppletPanel.init(
at sun.applet.AppletViewer.<init>(
at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.jav
at sun.applet.AppletViewer.parse(
at sun.applet.AppletViewer.parse(
at sun.applet.Main.main(

Don't wanna invent the wheel again!!
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Azam,
This usually comes about because of syntax errors inside the HTML. Common mistake:
Make sure you are using actual pixel values for height and width. The appletviewer doesn't support percentages. For example:
WIDTH="50%" not good
WIDTH=350 good
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Hello Azam,
What happens when you try to view the html file with a browser like Internet Explorer or Netscape?
Are you having this problem with the simplest example. Like:

And the html file could look like:

Post your code. Let's have a look.
Good Luck,
-Dirk Schreckmann

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Azam Bukhari
Ranch Hand

Joined: Oct 03, 2000
Posts: 58
Dear Sir/Friends:-
thanx a lot, the mistake was on my side...i didn't write the HTML correctly...

But still, the browser didn't show up the applet
if i directly click the html file but the applet runs very well with appletviewer command....
sorry for botherin for such a ridiculous stuff but still if you guyz can help me.. help me out!!
Thanx again
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
What browser are you using? What version of Java are did you code in? Do you have the browser plug-in to support that version of Java? Many browsers only support up to java 1.1.8 without a plug-in.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Azam Bukhari
Ranch Hand

Joined: Oct 03, 2000
Posts: 58
i am using IE-5.5 on Win 98 platform, plus i m using jdk1.3 version.
and i store my files in a seperate directory called mywork & not in jdk1.3\bin
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Yes, well, you need to let WINDOWS know what you are doing. All this path and classpath stuff that we keep talking about is only good for applications not applets. If you are using IE - it is pointing at a Windows version of java. The place for a browser to go look for the JDK is kept in the Windows registry.
When you download the plug-in for the 1.3 version of Java the Windows registry is automatically updated.
You can read the instructions and find the download here.
Consider Paul's rocket mass heater.
subject: Problem Running Applet
It's not a secret anymore!