Skip to main content

Launch Applet in Internet Explorer

8 replies [Last post]
stephencarpenter
Offline
Joined: 2006-03-08

I am having trouble launching an applet in IE6.
I use Netbeans5.5 to construct a very straight forward applet (a simple form with 3 textfields 1 combo box), which runs fine in the appletviewer, but will not run in IE.
I have plug in 1.5.09 in IE.
If I do not deploy the swing layouts jar in the applet jar - I get ClassDefNotFound (referring to GroupLayout) error.
If I deploy the swing layouts jar file - I get FileNotFound error.

Any ideas ????

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
leouser
Offline
Joined: 2005-12-12

what's the class name it can't find. Is is javax.swing.GroupLayout or something else?

leouser

stephencarpenter
Offline
Joined: 2006-03-08

Hi leouser,

the error message is : -
basic: Exception: java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group

leouser
Offline
Joined: 2005-12-12

where's the FileNotFound exception stack trace leading to?

leouser

stephencarpenter
Offline
Joined: 2006-03-08

The full message is :-

java.lang.ClassNotFoundException: HelloJApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\My_J2EE_Projects\HelloApplet\build\classes\classes\HelloJApplet\class.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more

The actual path to the class file is
C:\My_J2EE_Projects\HelloApplet\build\classes\org\me\hello.

So whats causing NetBeans to corrupt it and how do I put it right?

tackline
Offline
Joined: 2003-06-19

Can you show us your applet tag? It looks as if you have written something like code="HelloJApplet/class". It should be: code="HelloJApplet.class"

stephencarpenter
Offline
Joined: 2006-03-08

Here's the applet tag : -

stephencarpenter
Offline
Joined: 2006-03-08

Hi Leouser & Tackline,

I have sorted this now thanks for your efforts.

xteemux
Offline
Joined: 2006-11-22

Could you post your solution for everyone to read, please? Thanks!

Teemu