External JAR, NoClassDefFoundError [message #325850] |
Thu, 28 February 2008 17:13  |
Eclipse User |
|
|
|
Originally posted by: andy.auyeung.3ds.com
I have an external jar that I use in my Plug-in project. I added the jar
from "Config class path/Libraries/Add External JARs". The compile errors
went away after that.
However, when I test launch the Plug-in, I ran into an error. Those
classes in the external jar gave me NoClassDefFoundError.
Anyone knows the solution ?
|
|
|
Re: External JAR, NoClassDefFoundError [message #325860 is a reply to message #325850] |
Fri, 29 February 2008 06:26   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------020208080804000502030305
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Andy,
This is a classic mistake when developing plugins (and something that
the tools should either prevent or warn you about). At runtime, the
information in the MANIFEST.MF is used to find jars. That's also what's
used a development time to indirectly determine the classpath of the
project. But if you directly modify the properties of the project to
configure the classpath, you'll find the same problem comes back at
runtime. So when developing plugins, *always *use the Dependencies
tab of the MANIFEST.MF editor to fix classpath problems. Use the popup
PDE Tools->Update classpath if the changes to the MANIFEST.MF don't seem
to kick in; if you do this before making any changes there, you should
see your compilation error come back and that will help you verify
you've fixed that properly via changes to the dependencies.
Andy wrote:
> I have an external jar that I use in my Plug-in project. I added the
> jar from "Config class path/Libraries/Add External JARs". The compile
> errors went away after that.
>
> However, when I test launch the Plug-in, I ran into an error. Those
> classes in the external jar gave me NoClassDefFoundError.
> Anyone knows the solution ?
--------------020208080804000502030305
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Andy,<br>
<br>
This is a classic mistake when developing plugins (and something that
the tools should either prevent or warn you about). At runtime, the
information in the MANIFEST.MF is used to find jars.
|
|
|
|
|
Re: External JAR, NoClassDefFoundError [message #325882 is a reply to message #325860] |
Fri, 29 February 2008 11:15  |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Ed Merks wrote:
> Andy,
>
> This is a classic mistake when developing plugins (and something that
> the tools should either prevent or warn you about). At runtime, the
> information in the MANIFEST.MF is used to find jars. That's also what's
> used a development time to indirectly determine the classpath of the
> project. But if you directly modify the properties of the project to
> configure the classpath, you'll find the same problem comes back at
> runtime. So when developing plugins, *always *use the Dependencies
> tab of the MANIFEST.MF editor to fix classpath problems. Use the popup
> PDE Tools->Update classpath if the changes to the MANIFEST.MF don't seem
> to kick in; if you do this before making any changes there, you should
> see your compilation error come back and that will help you verify
> you've fixed that properly via changes to the dependencies.
There is a Bugzilla about this somewhere, but I can't seem to find it now.
>
>
> Andy wrote:
>> I have an external jar that I use in my Plug-in project. I added the
>> jar from "Config class path/Libraries/Add External JARs". The compile
>> errors went away after that.
>>
>> However, when I test launch the Plug-in, I ran into an error. Those
>> classes in the external jar gave me NoClassDefFoundError.
>> Anyone knows the solution ?
>
|
|
|
Powered by
FUDForum. Page generated in 0.04180 seconds