commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hope, Matthew" <Matthew.H...@capitalone.com>
Subject RE: [Commons] Component Packaging Options
Date Fri, 09 May 2003 14:03:17 GMT
One option is using an ide such as Jbuilder (can others do this?) is to make
your application or libraray a jar and specify that any dependant classes
are compiled into the jar as well.

This allows you to bundle the required versions into the jar (assuming there
are no namespace clashes which jakarta avoids nicely) along with all your
code and run it that way. Not the nicest and not the easiest to maintain but
if you really want it all in one jar that's one way.

I use this to bundle libraries up when I'm providing users with a java app
and I don't want to have to muck around with batch files and sorting out
common directory structures on their PC's (since they end up messing these
up)

So I create a jar as above. Give it a manifest identifying the main class
then concat the file with the following header
(CRLF just means new line)

java -jar nameOfMyJar.bat<CRLF>

Then rename the resulting file to nameOfMyJar.bat. They double click on it
the app runs. If you want to know if there was a problean put a pause in:

java -jar nameOfMyJar.bat<CRLF>
Pause<CRLF>

Hacky but I've had no maintenance hassles over it since I gave it to them...

Matt

-----Original Message-----
From: Timko, Cheryl A. [mailto:cheryl_timko@merck.com] 
Sent: 09 May 2003 13:22
To: 'commons-user@jakarta.apache.org'
Subject: [Commons] Component Packaging Options


All,

I was hoping someone else had experienced this dilemma using the Jakarta
Commons components...

I have created a company-wide shared component which utilizes the Digester
and DBCP component.  Both the Digester and DBCP  components are dependent on
other Jakarta Common components.

Since I tested and validated my shared component with the specific versions
of the Jakarta Commons components, I want to package these Jakarta Common
versions with my component (I do not want other versions to be used).

If I package my shared component into a jar file that contains the Jakarta
Commons jars, is the only way to load classes contained in the Jakarta
Commons jars via a custom class loader or is there any other way, like using
the JAR Class-Path (I thought this option was only used for applications
with a main())?

Any suggestions would be greatly appreciated...

> Cheryl Timko
> USHH IS Application Architecture
> * WP97-A315
> * 215-652-8822   
> * cheryl_timko@merck.com
> 
> 
> 
> 


----------------------------------------------------------------------------
--
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that
may be confidential, proprietary copyrighted and/or legally privileged, and
is intended solely for the use of the individual or entity named on this
message.  If you are not the intended recipient, and have received this
message in error, please immediately return this by e-mail and then delete
it.

============================================================================
==


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
 
**************************************************************************
The information transmitted herewith is sensitive information intended only
for use by the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.

Mime
View raw message