This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 81678 - Cannot run JApplet Form outside NetBeans
Summary: Cannot run JApplet Form outside NetBeans
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
Depends on:
Reported: 2006-08-02 10:31 UTC by Jaromir Uhrik
Modified: 2010-02-08 11:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2006-08-02 10:31:54 UTC
[NB5.0, jdk 1.5; behavior is little bit different on jdk6 because it contains
SwingLayout library]
1.Create j2se project
2.Create new JAppletForm with name "MyApplet"
3.Build project
4.Select MyApplet in projects view and invoke Run action on it
5.In build/classes there appears MyApplet.html, but when this file is viewed by
browser outside of NetBeans it fails with java.lang.NoClassDefFoundError:
org/jdesktop/layout/GroupLayout$Group (on java6.0 it works because it contains
The second problem of the concept is that the MyApplet.html is deleted when the
project is rebuilt and recreated when Run is invoked on
The third problem is that the MyApplet.html should be created in dist/ folder of
the project and user must be able to run applet by its viewing in browser
because dist/ folder is the common place of deployed project.
Comment 1 Tomas Zezula 2006-09-12 14:57:04 UTC
This issue has two parts. The applet requires correct code base attribute with
swinglayout.jar. The second part is that the html file is created into build
folder, it should be generated into the dist folder with some reasonable unique
name (fqn of applet class?)
Comment 2 Milan Kubec 2006-10-17 14:28:19 UTC
I think that the layout library should be defined by archive attribute, like this:

<APPLET archive="JavaApplication1.jar,lib/swing-layout-1.0.jar" 
    code="javaapplication1/NewJApplet.class" width=350 height=200>

and the applet will be created under dist folder with name
javaapplication1-NewJApplet.html as Tomas suggested.
Comment 3 Petr Hrebejk 2007-07-12 16:22:30 UTC
Not widely used I guess.
Comment 4 Tomas Zezula 2007-10-24 10:55:04 UTC
Not for 6.0
Comment 5 Jan Becicka 2008-11-13 14:17:48 UTC
Since JDK1.6U10 resurrects applets, let's try to fix this.
Comment 6 Tomas Zezula 2009-09-30 19:39:57 UTC
Better support for Applet as well as support for Applet with jnlp (Mustang) is required.
Comment 7 Tomas Zezula 2010-02-08 11:21:54 UTC
The test applet page is not intended to be used externally.
Please use the JNLP base applet deployment.
Project Properties/Web Start.
After turning on and clean & build it generates launch.html in dist folder which uses deployJava.js and JNLP file to start the applet.