Java Reference
In-Depth Information
The three separate repositories are each self-contained projects with support for building
both with Eclipse ( Compiling, Running, and Testing with an IDE ) and with Maven ( Auto-
mating Dependencies, Compilation, Testing, and Deployment with Apache Maven ) . Note
that Maven will automatically fetch a vast array of prerequisite libraries when first invoked
on a given project, so be sure you're online on a high-speed Internet link. However, Maven
will ensure that all prerequisites are installed before building. If you choose to build pieces
individually, look in the file pom.xml for the list of dependencies. Unfortunately, I will prob-
ably not be able to help you if you are not using either Eclipse or Maven with the control
files included in the download.
If you have Java 7 instead of the current Java 8, a few files will not compile. You can make
up “exclusion elements” for the files that are known not to compile.
All my code in the three projects is released under the least-restrictive credit-only license, the
two-clause BSD license. If you find it useful, incorporate it into your own software. There is
no need to write to ask me for permission; just use it, with credit.
TIP
Most of the command-line examples refer to source files, assuming you are in src/main/
java , and runnable classes, assuming you are in (or have added to your classpath) the
build directory (e.g., for Maven this is target/classes , and for Eclipse it is build ). This will
not be mentioned with each example, because it would waste a lot of paper.
Caveat Lector
The repos have been in development since 1995. This means that you will find some code
that is not up to date, or that no longer reflects best practices. This is not surprising: any body
of code will grow old if any part of it is not actively maintained. (Thus, at this point, I invoke
Culture Club's, “Do You Really Want to Hurt Me?”: “Give me time to realize my crimes.”)
Where advice in the topic disagrees with some code you found in the repo, keep this in mind.
One of the practices of Extreme Programming is Continuous Refactoring—the ability to im-
prove any part of the code base at any time. Don't be surprised if the code in the online
source directory differs from what appears in the topic; it is a rare week that I don't make
some improvement to the code, and the results are committed and pushed quite often. So if
there are differences between what's printed in the topic and what you get from GitHub, be
glad, not sad, for you'll have received the benefit of hindsight. Also, people can contribute
Search WWH ::




Custom Search