Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display [message #465546] |
Thu, 15 December 2005 01:56 |
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 |
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 |
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 #465609 is a reply to message #465591] |
Thu, 15 December 2005 19:57 |
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.
>>
>> [...]
|
|
|
Powered by
FUDForum. Page generated in 0.03578 seconds