Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] desperate : NoClassDefFoundError on Composite

It is not possible to package all jar in a big jar. There are several ways to do what you want. One way is to compact everything with ProGuard. It seems that in the latest version it is possible to do this. But it is a little bit tricky. Another way is to use uberjar from apache. http://maven.apache.org/reference/plugins/uberjar/

Hope this helps.

Hubert

From: "Johan Wasserman - BCX - Infrastructure Services" <Johan.Wasserman@xxxxxxxxx>
Reply-To: platform-swt-dev@xxxxxxxxxxx
To: <platform-swt-dev@xxxxxxxxxxx>
Subject: [platform-swt-dev] desperate : NoClassDefFoundError on Composite
Date: Fri, 29 Oct 2004 11:35:42 +0200

I have eventually convinced my bosses that Java is the way to go, got a
nice project, wrote it using SWT and everything's fine.... untill now:

I need to make the app "stand allone", in other words, not run from the
Eclipse IDE.  So my classes are all in the default package (root) except
for one or two utillity classes.  All my jars, including swt.jar, is in
lib and all the required dll's also lies in the root of the project.

So, I jar'd the root of the project and now I'm trying to run the app
from it.  So remember all the classes, jar's and dll's are contained
whithin the new jar.

I get the following error when trying to run the app from the jar...

Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/swt/widgets/Composite
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)


My main class extends org.eclipse.swt.widgets.Composite and I made the
jar runnable (manifest entry).

_________________________________________________________________
MSN Messenger : discutez en direct avec vos amis ! http://www.msn.fr/msger/default.asp



Back to the top