• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Netbeans 5 beta - Swing jar problem

 
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created a java project in NB 5 (beta) and the layout manager is frickin' fantastic...however...the jars that are generated will not execute.

I found this and followed the instructions:

http://www.netbeans.org/kb/50/quickstart-gui.html

However, I still get this error in Windows:

"Could not find the main class. Program will exit"

In linux I get this error when running "java -jar <app>":

"Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group"

Obviously there's a problem w/ the Swing layout extensions.

I'm not a Swing programmer and am almost completely unfamiliar w/ it other than my own tinkering.

How do I get this library to show up in the classpath if putting it in the manifest didn't work? I need to be able to deploy this to Windows users easily.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I continued to get the same problem until I realized the instruction:

Class-Path: swing-layout-1.0.jar

should say:

Class-Path: swing-layout-<version>.jar

Where you enter the version of the swing-layout jar you have. In my case I have swing-layout-0.7.jar so version 0.7.

After adding the line:

Class-Path: swing-layout-0.7.jar

to my manifest.mf file it worked - whoohoo!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic