export jars with referenced jars [message #271147] |
Wed, 27 May 2009 12:27  |
Eclipse User |
|
|
|
Originally posted by: faraz.fallahi.googlemail.com
Hi.
I need to export my Eclipse Java project as a jar and I want to include
the referenced libraries. Ive read that eclipse doesnt support this. But
today i found a post that says eclipse 3.5 is able to do this. if so,how
does it work. ive tried eclipse 3.5 and the steps for exporting a java
project as a jar seem to be similarto prior versions.
Does anybody know anything about this ? Or is there another easy way to
do this?
greez
|
|
|
|
|
|
|
Re: export jars with referenced jars [message #271191 is a reply to message #271147] |
Wed, 27 May 2009 22:15  |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
exquisitus wrote:
> Hi.
> I need to export my Eclipse Java project as a jar and I want to include
> the referenced libraries. Ive read that eclipse doesnt support this. But
> today i found a post that says eclipse 3.5 is able to do this. if so,how
> does it work. ive tried eclipse 3.5 and the steps for exporting a java
> project as a jar seem to be similarto prior versions.
> Does anybody know anything about this ? Or is there another easy way to
> do this?
Java in general does not support nesting JARs inside other JARs; they
can't be included on the classpath. This is a limitation of Java, not
Eclipse specifically.
The most common approach is to package things up and include a script
for setting up the runtime classpath to include all necessary JARs. If
you're dealing with an application server (like Tomcat, Jetty, JBoss,
WebLogic, WebSphere, etc) then your app needs to be packaged as a WAR or
EAR, a different topic altogether.
Hope this helps,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.06633 seconds