Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / December 2003

Tip: Looking for answers? Try searching our database.

Eclipse: building an (non-j2EE) app jar file.

Thread view: 
P.Hill - 11 Dec 2003 22:26 GMT
I have a lovely Eclipse project with source and various referenced libraries.
I was playing the the Jar creation tool, but can't figure out one thing.

What is the best way to instruct it to build a jar with all
of the .classes from various libraries (i.e. Junit, whatever
JDBC I using etc.)

It seems kludgie to unzip all such jars into a resource directory, it would
certainly slow down project rebuilds wouldn't it?

What is the reasonable clean approach using Eclipse to identify contents of
Jars that I want to place into my final build jar (it is not a J2EE war file
just a jar full of classes and resources)?

-Paul
Jose Rubio - 13 Dec 2003 21:32 GMT
The best approach is to keep them separate and include all of them in the
classpath of the application.

Jose

> I have a lovely Eclipse project with source and various referenced libraries.
> I was playing the the Jar creation tool, but can't figure out one thing.
[quoted text clipped - 11 lines]
>
> -Paul
P.Hill - 17 Dec 2003 17:25 GMT
> The best approach is to keep them separate and include all of them in the
> classpath of the application.
> "P.Hill" <goodhill@xmission.com> wrote in message
>>What is the best way to instruct it to build a jar with all
>>of the .classes from various libraries (i.e. Junit, whatever
>>JDBC I using etc.)
[...]

>>It seems kludgie to unzip all such jars into a resource directory, it

Just to clarify the details, I think you are saying that the best way to play
with Eclipse is to take any library I want to be in my non-j2EE application jar
and
(1) drop it from the list of libraries in the class path
(2) unsip the classes into some extra dir (maybe workspace/<project>/libclasses)
(3) identify this DIRECTORY as a source directory in the project (it will find
no sources, but it will move non-source out and into the bin dir when building)

This will result in a bigger and better set of classes in my bin and thus in the
final jar.

Are these the details of what you are suggesting?
-Paul


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.