• Post Reply Bookmark Topic Watch Topic
  • New Topic

applet works in appletviewer but not in browser  RSS feed

Posts: 9082
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a very simple applet. It works fine in appletviewer. It doesn't work at all in IE or Netscape.

<!-- AboutApplet.html -->
� <head> // deleted for brevity
� </head>
� <body>
��� <applet code=AboutApplet.class width=200 height=100 >
��� </applet>
� </body>

import javax.swing.* ;

public class AboutApplet extends JApplet

��� public void init()
��� {
������� JOptionPane.showMessageDialog( null, "About theApp" );
��� }


IE 5.00 error
java.lang.ClassNotFoundException: javax.swing.JApplet
� at com/ms/vm/loader/URLClassLoader.loadClass
� at java/lang/ClassLoader.loadClassInternal

Doesn't IE 5.00 support Swing?

IE 4.71 error
>java.io.FileNotFoundException: \C:\Java\javax\swing\JApplet.class
>java.lang.ClassNotFoundException: javax.swing.JApplet
>at com/ms/vm/loader/URLClassLoader.loadClass

<snipped> etc.

Why is it looking for JApplet in \C:\Java\javax\swing\�when the current directory is C:\java� ???

NN4.72 error
>Netscape Communications Corporation -- Java 1.1.5

Hmmm. Maybe this error is because NN is using Java 1.1.5
But I do have Java Plug-in 1.3 for Netscape Navigator with JDK/JRE 1.3 installed and enabled.

>Symantec Java! ByteCode Compiler Version 210.065
>Copyright (C) 1996-97 Symantec Corporation
># Applet exception: error: java.lang.ClassFormatError: Class already loaded
>java.lang.ClassFormatError: Class already loaded
> at java.lang.ClassLoader.defineClass(Compiled Code)
> at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
> at netscape.applet.AppletClassLoader.findClass(Compiled Code)

[This message has been edited by Marilyn deQueiroz (edited June 03, 2001).]
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you have to modify your applet.HTML file to download the swing plugin from sun.com site automatically.
I know one tool 'HTMLConverter' which converts your html file to require syntax. This tool is available on internet, Search in google search engine.
puneguy !
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!