aspose file tools*
The moose likes Applets and the fly likes applet works in appletviewer but not in browser 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 appletviewer but not in browser" Watch "applet works in appletviewer but not in browser" New topic
Author

applet works in appletviewer but not in browser

Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
I wrote a very simple applet. It works fine in appletviewer. It doesn't work at all in IE or Netscape.

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

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
<snipped>

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).]


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
java puneri
Greenhorn

Joined: Jun 04, 2001
Posts: 14
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 !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: applet works in appletviewer but not in browser