Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem Running Applet

 
Azam Bukhari
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Community, i am getting problem in running this damn applet..as 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
.exception
at java.util.ResourceBundle.getObject(ResourceBundle.java:382)
at java.util.ResourceBundle.getString(ResourceBundle.java:354)
at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:
42)
at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:697)
at sun.applet.AppletPanel.init(AppletPanel.java:185)
at sun.applet.AppletViewer.<init>(AppletViewer.java:175)
at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.jav
a:81)
at sun.applet.AppletViewer.parse(AppletViewer.java:1035)
at sun.applet.AppletViewer.parse(AppletViewer.java:969)
at sun.applet.Main.run(Main.java:140)
at sun.applet.Main.main(Main.java:82)

 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Regards,
Manfred.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Azam Bukhari
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Azam Bukhari
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir,
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"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic