Note that there are some explanatory texts on larger screens.

plurals
  1. POErrors deploying Applet created in Netbeans, using Netbeans and Swing
    primarykey
    data
    text
    <p>I've created an Applet with NetBeans. My partner used NetBean's Drag-and-Drop Swing editor for the interface. It runs perfectly fine with no exceptions or warnings when I right click on the applet file and click "run". However, it throws this exception when I build it and put the NetBeans generated html file on the apache server on my machine and run it. </p> <p>Here is step by step what I'm doing to deploy it to my local server (~myHome/Sites/):</p> <ol> <li><p>I click "clean and build"</p></li> <li><p>I right click on the tab applet source file and select "run". It opens and runs fine in a new window. (It also creates a Applet.html file for testing, which is why I do it)</p></li> <li><p>I run $ cp -r /build ~myHome/Sites This copies the html file for testing and the class folder with all the compiled classes to my sites folder</p></li> <li><p>Open a web browser to the path and it gives an error and doesn't load</p></li> </ol> <p>Here is the error from the console:</p> <pre><code>basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@316d3536 basic: Applet loaded. basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 260792 us, pluginInit dt 255591692 us, TotalTime: 255852484 us network: Cache entry not found [url: http://***.edu/~myHomeDirectory/build/classes/org/jdesktop/layout/GroupLayout$Group.class, version: null] network: Connecting http://~myHomeDirectory/Sites/build/classes/org/jdesktop/layout/GroupLayout$Group.class with proxy=DIRECT network: Connecting http://***.edu:80/ with proxy=DIRECT network: Connecting http://***.edu/~myHomeDirectory/Sitesbuild/classes/org/jdesktop/layout/GroupLayout$Group.class with cookie basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@316d3536 Exception in thread "thread applet-tab_interface/TabApplet.class-4" java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group at tab_interface.Mediator.&lt;init&gt;(Mediator.java:26) at tab_driver.TabDriver.&lt;init&gt;(TabDriver.java:86) at tab_interface.TabApplet.init(TabApplet.java:69) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1640) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.ClassNotFoundException: org.jdesktop.layout.GroupLayout$Group at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:252) at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:250) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:180) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:161) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 5 more </code></pre> <p>So I guess my main questions are:</p> <p>Is there something extra I have to do to deploy and applet created using the NetBeans Swing editor?</p> <p>Any suggestions about what should do next to tackle this problem? I've followed the exception and it leads to Mediator line 26... which is:</p> <pre><code>gui = new AppletGUI(); </code></pre> <p>That line is the constructor for the GUI class created by NetBeans Swing Editor. Here's some basic code to show whats going on. The applet, GUI, GUIMediator are in one package and the TabDriver is in its own.</p> <pre><code>class MyApplet extends Applet{ GUIMediator gui; TabDriver driver; init(){ driver = new TabDriver(...); // TabDriver creates a mediator gui = driver.getMediator(); try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { createGUI(); } }); } catch (InterruptedException ex) { ... } catch (InvocationTargetException ex) { ... } } void createGUI(){ this.add(gui.getGUI()); // add JPanel to Applet } } class TabDriver { TabDriver (...) { this.mediator = new GUIMediator(this); } } class GUIMediator { TabDriver driver; JPanel GUI; GUIMediator(TabDriver td) { driver = td; GUI = new TabGUI(); } } class TabGUI extends JPanel { TabGUI() { // super(); // init(); // initListeners(); // ... } } </code></pre> <p>Note that everything in the TabGUI is commented out and that it still throws the exception when TabGUI is initialized in a web browser.</p> <p>Sorry this is so long.</p> <p>Thank you, -N</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload