NGay@xxxxxxxxxxxxx wrote:

There's a couple of comments you made that sparked my interest:

* Eclipse (WDSC) for code development
* Apache Ant for building and deploying

.... I bundled all my complied classes into Jar files
I've never understood why developers using Eclipse still use Ant? You
don't need to perform a distinct "build" step since Eclipse automatically
compiles every .class file as you changes its source file. So you create
your JARs just by highlighting them, picking File-Export and exporting the
JAR. The only reasons I can think of for using Ant would be:
a) If you had a huge number of JARs and so exporting them one by one was
just too tedious.
b) If you needed your JARs to be different for development & production
environments (which to me is a really bad idea, but I've known one
developer who was quite serious about wanting to do this).

I don't use Ant for compiling the classes, since Eclipse does that. I just use Ant to build the jars, and (optionally) deploy them to out test / production environments. Using Ant to build the jars has some nice benefits:
* The Ant manifest task allows me to create manifest files for all my jars in one place, I find this is easier than maintaining separate external manifest files. I make use of the Ant "variables" to share common stuff amongst the differant manifests.
* I can automate the task of signing the jars in the Ant buildfile, this is useful for Java Web Start
* I can use detailed include and exclude statements to selectively include classes in my Jars
* No matter which person in our team builds the (SVN shared) project, the jars will be built the same way.

You don't need many jars before you start seeing the benefit. I currently create ~6 jars for my Ldap management project, as each of the command line applications needs to be in a separate Jar with it's own main-class manifest file. These applications, as well as the GUI Java Web Start applications, share a common set of library jars. I can then play with whatever classes in my project I want, run the ant build and be confident that the appropriate jars will get updated.

I did much the same, created a /CpaJava folder and stuck all the JARs and a
.properties file in there. I didn't bother with separate apps/lib/ext
folders since we've only got about a dozen JARs so it didn't seem worth it.

That's good to hear, I get a little nervous when I start making this stuff up!

Did you try using the Visual Editor Eclipse plugin for Swing? I tried this
at first since I was used to Delphi which has a really nice visual form
designer and I wanted something that worked the same. But its absolutely
horrid, I found if I breathed on the code it autogenerated it would then
refuse to parse it and I couldn't load it back into the visual editor.

Yeah, I've grown accustomed to the idiosyncrasies of the JVE. It's a pain, as I end up creating unnecessary properties and methods just to keep the JVE happy. But I decided to stick with it for now as the rest of my team is still significantly behind me in terms of learning Java, and I felt the JVE was a great crutch to get me started, and I want to stick with it so it will be useful for them. Besides now that I've figured out the syntax that the JVE prefers, it's not such a difficult scheme to mimic.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.