Exporting libraries to jar file? [message #249155] |
Mon, 18 February 2008 03:51  |
Eclipse User |
|
|
|
Originally posted by: Abel.MacAdam.eden.invalid
Hi,
How do you instruct Eclipse to export libraries you used while developing?
When I try to start my Applet I get the following error in my Java Console:
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
When I check the contents of my jar file I see that indeed, no
log4j-1.2.15.jar entry exists in the jar file I created while exporting my
result.
I checked the Eclipse (Europa) help file, and thought I need to set what I
export from my project in the 'Java Build Path'. If I understand
correctly, I need to select the jar files I want to export in the 'Order
and Export' tab of the 'Java Build Path' window. That I did. But the
log4j-1.2.15.jar file is not included in the export result. What am I
missing?
TIA,
Abel
|
|
|
|
|
|
|
Re: Exporting libraries to jar file? [message #249251 is a reply to message #249203] |
Mon, 18 February 2008 17:53  |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Mark Dexter wrote:
> Abel MacAdam wrote:
>> Thanks Felix,
>>
>> That helped a lot. Now for hoping I can get an answer on my question
>> how I can export using Eclipse (bypassing jarring my own jar file on
>> the command prompt).
>>
>> Abel
>>
> Hi Felix. During the Eclipse export to jar, you can name an existing
> manifest file to use. So, first create the manifest file (e.g.,
> manifest.txt using the Eclipse editor) and then second name this file
> during the Eclipse JAR file export. HTH. Mark
The manifest will have to name the other JARs that you depend on and
their relative location. For Applet deployment on a web server those
other JARs will have to be available next to yours.
See the specification for manifest files for more details on how to
specify JARs in it.
Hope this helps,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.08843 seconds