Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display [message #465546] Thu, 15 December 2005 01:56 Go to next message
Eclipse User
Originally posted by: invalid.invalid.invalid

Hello,

I have a problem with starting my SWT application from a jar file
under Windows XP. In Eclipse everything works fine. But when I
run the jar file I get this error:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/swt/widgets/Display

I have copied swt.jar and swt-win32-3064.dll to the jars
directory. And I have added the swt.jar to the manifest file.

I tried this when I started with my project and it worked. Now I
get the above error.

Thanks,

Nick
Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Dis [message #465578 is a reply to message #465546] Thu, 15 December 2005 14:25 Go to previous messageGo to next message
Eclipse User
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Did you point to the directory where you moved the dll in your
java.library.path command line option?

Nicola-Patric Wegner wrote:
> Hello,
>
> I have a problem with starting my SWT application from a jar file
> under Windows XP. In Eclipse everything works fine. But when I
> run the jar file I get this error:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/eclipse/swt/widgets/Display
>
> I have copied swt.jar and swt-win32-3064.dll to the jars
> directory. And I have added the swt.jar to the manifest file.
>
> I tried this when I started with my project and it worked. Now I
> get the above error.
>
> Thanks,
>
> Nick

--
Thanks,
Rich Kulp
Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Dis [message #465582 is a reply to message #465578] Thu, 15 December 2005 15:05 Go to previous messageGo to next message
Eclipse User
Originally posted by: invalid.invalid.invalid

Yes, I started with

java -Djava.lirary.path="D:\path_to_dll_and_jars" -jar myjar.jar

but I get the same error as before.

I think it should even work without the java.library.path option
because the dll and all the jars are in the same directory.

Any more ideas?

Rich Kulp wrote:
> Did you point to the directory where you moved the dll in your
> java.library.path command line option?
>
> Nicola-Patric Wegner wrote:
>> Hello,
>>
>> I have a problem with starting my SWT application from a jar file
>> under Windows XP. In Eclipse everything works fine. But when I
>> run the jar file I get this error:
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/eclipse/swt/widgets/Display
>>
>> I have copied swt.jar and swt-win32-3064.dll to the jars
>> directory. And I have added the swt.jar to the manifest file.
>>
>> I tried this when I started with my project and it worked. Now I
>> get the above error.
>>
>> Thanks,
>>
>> Nick
>
Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Dis [message #465584 is a reply to message #465582] Thu, 15 December 2005 15:29 Go to previous messageGo to next message
Stefan Langer is currently offline Stefan Langer
Messages: 236
Registered: July 2009
Senior Member
Nicola-Patric Wegner wrote:
> Yes, I started with
>
> java -Djava.lirary.path="D:\path_to_dll_and_jars" -jar myjar.jar
Hope this is just a cut & paste error but you spelled -Djava.lirary not
-Djava.library

> but I get the same error as before.
>
> I think it should even work without the java.library.path option
> because the dll and all the jars are in the same directory.
>
> Any more ideas?
>
> Rich Kulp wrote:
>
>>Did you point to the directory where you moved the dll in your
>>java.library.path command line option?
>>
>>Nicola-Patric Wegner wrote:
>>
>>>Hello,
>>>
>>>I have a problem with starting my SWT application from a jar file
>>>under Windows XP. In Eclipse everything works fine. But when I
>>>run the jar file I get this error:
>>>
>>>Exception in thread "main" java.lang.NoClassDefFoundError:
>>>org/eclipse/swt/widgets/Display
>>>
>>>I have copied swt.jar and swt-win32-3064.dll to the jars
>>>directory. And I have added the swt.jar to the manifest file.
>>>
>>>I tried this when I started with my project and it worked. Now I
>>>get the above error.
>>>
>>>Thanks,
>>>
>>>Nick
>>
Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Dis [message #465588 is a reply to message #465584] Thu, 15 December 2005 15:41 Go to previous messageGo to next message
Eclipse User
Originally posted by: invalid.invalid.invalid

Stefan Langer wrote:
>
> Nicola-Patric Wegner wrote:
>> Yes, I started with
>>
>> java -Djava.lirary.path="D:\path_to_dll_and_jars" -jar myjar.jar
> Hope this is just a cut & paste error but you spelled -Djava.lirary not
> -Djava.library
Yes, it is just a cut&paste error. It was on two lines. Sorry.

[...]
Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Dis [message #465591 is a reply to message #465588] Thu, 15 December 2005 16:25 Go to previous messageGo to next message
Stefan Langer is currently offline Stefan Langer
Messages: 236
Registered: July 2009
Senior Member
Have you tried starting your application using jar in the classpath and
specifiing the startup class manually? Do you get the same result?

Regards
Stefan

Nicola-Patric Wegner wrote:
> Stefan Langer wrote:
>
>>Nicola-Patric Wegner wrote:
>>
>>>Yes, I started with
>>>
>>>java -Djava.lirary.path="D:\path_to_dll_and_jars" -jar myjar.jar
>>
>>Hope this is just a cut & paste error but you spelled -Djava.lirary not
>>-Djava.library
>
> Yes, it is just a cut&paste error. It was on two lines. Sorry.
>
> [...]
Re: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Dis [message #465609 is a reply to message #465591] Thu, 15 December 2005 19:57 Go to previous message
Eclipse User
Originally posted by: invalid.invalid.invalid

Thank you, I have found the error. The manifest file was wrong.
I separated the jars with a ',' and not with a space.

With "Class-Path: swt.jar, jdom.jar" only jdom.jar was used. With
"Class-Path: swt.jar jdom.jar" everything works fine.

Thanks again,
Nick

Stefan Langer wrote:
> Have you tried starting your application using jar in the classpath and
> specifiing the startup class manually? Do you get the same result?
>
> Regards
> Stefan
>
> Nicola-Patric Wegner wrote:
>> Stefan Langer wrote:
>>
>>>Nicola-Patric Wegner wrote:
>>>
>>>>Yes, I started with
>>>>
>>>>java -Djava.lirary.path="D:\path_to_dll_and_jars" -jar myjar.jar
>>>
>>>Hope this is just a cut & paste error but you spelled -Djava.lirary not
>>>-Djava.library
>>
>> Yes, it is just a cut&paste error. It was on two lines. Sorry.
>>
>> [...]
Previous Topic:SWT button
Next Topic:eclipse crash under linux ppc
Goto Forum:
  


Current Time: Mon Sep 15 02:12:50 GMT 2014

Powered by FUDForum. Page generated in 0.01865 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software