Common Classes between projects [message #170667] |
Wed, 28 July 2004 15:09  |
Eclipse User |
|
|
|
Originally posted by: stledger.lanl.gov.removethis
I'm a Java developer working on a Mac OS X system, vsn 10.3.4. I'm
learning eclipse 3.0 to see if I want to use it for my IDE. I've used
CodeWarrior and Project Builder in the past.
Eclipse seems to work very well, but I have one issue that I don't like
the work around for. I want to share source files between applications
(projects).
I have seven Java applications that I distribute in Jar Files on a CD.
Each application is designed to run in its own directory, with its own
files. Each application has a number of unique classes, and shares
about 30 utility classes with the other applications. The classes are
arranged in packages, and the main class for each application is in the
default package.
Currently, I have one project, with ALL of the source files and class
files. I can run each individual application as needed.
When I create a jar file to distribute each individual application, do I
have to manually check each class file that I want included every time I
create a new jar file?
Can I somehow have one copy of a source file that is shared between
projects? (When I use a working set, and edit a file, it is only
updated in the project directory in the workspace, and not in the
working set directory in the workspace. I'm probably not setting
something up right.)
Thanx,
John
--
John St. Ledger | "Every calculation based on experience elsewhere,
| fails in New Mexico."
|
| Lew Wallace, Territorial Gov., 1878-81
|
|
|
|
Re: Common Classes between projects [message #170754 is a reply to message #170667] |
Thu, 29 July 2004 10:05   |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
John St. Ledger wrote:
> I'm a Java developer working on a Mac OS X system, vsn 10.3.4. I'm
> learning eclipse 3.0 to see if I want to use it for my IDE. I've used
> CodeWarrior and Project Builder in the past.
>
> Eclipse seems to work very well, but I have one issue that I don't like
> the work around for. I want to share source files between applications
> (projects).
>
> I have seven Java applications that I distribute in Jar Files on a CD.
> Each application is designed to run in its own directory, with its own
> files. Each application has a number of unique classes, and shares
> about 30 utility classes with the other applications. The classes are
> arranged in packages, and the main class for each application is in the
> default package.
>
> Currently, I have one project, with ALL of the source files and class
> files. I can run each individual application as needed.
>
> When I create a jar file to distribute each individual application, do I
> have to manually check each class file that I want included every time I
> create a new jar file?
Like someone else suggested, I think your best bet is to create a
separate Project for the shared code. Another recommendation I'll make
is to use Ant to build your distribution, including the JARs. Exporting
JARs from Eclipse works, but when you need to do more complicated things
like assemble files into particular directories and/or select a subset
of a group of files, Ant is the way to go. You can even invoke it from
Eclipse if you choose, so doing the Ant build is easy.
HTH,
Eric
|
|
|
Re: Common Classes between projects [message #171132 is a reply to message #170754] |
Mon, 02 August 2004 10:12  |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
Eric Rizzo wrote:
> Like someone else suggested, I think your best bet is to create a
> separate Project for the shared code. Another recommendation I'll make
> is to use Ant to build your distribution, including the JARs. Exporting
> JARs from Eclipse works, but when you need to do more complicated things
> like assemble files into particular directories and/or select a subset
> of a group of files, Ant is the way to go. You can even invoke it from
> Eclipse if you choose, so doing the Ant build is easy.
For help with Ant, start here: http://ant.apache.org/
HTH,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.03954 seconds