Applet not displayed in Browsers

Hello!

I am using JDK1.2.2 and developing applets that are using the Swing components that were introduced in JDK 1.2. When I run the applet in applet viewer it runs fine but when I try to run it in the Browsers (Netscape 4.7 or IE 5.0/5.5) the applet is not displayed. Netscape shows this exception in the Java Console :

Netscape Communications Corporation -- Java 1.1.5Type '?' for options.Symantec Java! ByteCode Compiler Version 210.065

Copyright (C) 1996-97 Symantec Corporation

warning: running 1.2 version of SwingUtilities# Applet exception: error: java.lang.NoClassDefFoundError: sun/awt/AppContextjava.lang.NoClassDefFoundError: sun/awt/AppContext at javax.swing.SwingUtilities.appContextGet(Compiled Code) at javax.swing.TimerQueue.sharedInstance(Compiled Code)* at javax.swing.JApplet.<init>(Compiled Code) at TreeApplet.<init>(Compiled Code) at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled Code) at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code) at java.awt.EventDispatchThread.run(Compiled Code) at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)

Apparently the problem seems to be the version of JRE/JVM that the Browser seems to be using (which in this case is Java 1.1.5 which incidentally does not support swings) a previous version of the JVM.

I would be obliged if somebody can help me with this.

Adnan

[1477 byte] By [adnan 027] at [2007-9-26 4:12:01]
# 1

Hi Adnan,

Please check from command prompt which version of JAVA and JRE you are using. If you are seeing java1.1.5 which doesn't support swings re install the new version of JAVA and JRE and then try by running your program.

If you are still facing the problem please send me sample code so that i can test here to solve your problem.

Anil.

Developer Technical Support

Sun Microsystems Inc, India.

http://www.sun.com/developers/support

ramanil_indts at 2007-6-29 13:17:31 > top of Java-index,Desktop,Deploying...
# 2

I'm trying to open the sample html files containing embedded applets, provided with the JDK (jdk1.3.1\demo\applets\Animator) with IE 5, 5.5 & 6, but in each one of them the applets fail to load. The browser displays the following error:

exception:java.lang.ClassNotFoundException:java.util.list

However, all the pges work perfectly well when viewed in the appletviewer.

I'm using jdk1.3.1. Please help.

Faisal Ali Khan

faikhan at 2007-6-29 13:17:31 > top of Java-index,Desktop,Deploying...