Introduction
The org.clapper.util Java Utility Library is a library of miscellaneous utility classes and methods. As a general-purpose set of tools, this API is a conceptual extension of the JDK.
Note: I don’t use this library much any more. I do most of my JVM-based programming in Scala, rather than Java, and my Grizzled Scala library is the Scala-equivalent of this library.
However, I do ensure that this library is kept up-to-date, and if there are bugs in it, I try to fix them. If you run into a problem using this library, open an issue, and I will try to address it.
Installation
The Java Utility Library is published to the Bintray Maven repository, which is automatically linked to Bintray’s JCenter repository. (From JCenter, it’s eventually pushed to the Maven Central Repository.)
Using from Maven
If you’re building your project with Maven, just specify the artifact as a dependency:
<dependency>
<groupId>org.clapper</groupId>
<artifactId>javautil</artifactId>
<version>3.2.0</version>
</dependency>
If you cannot resolve the artifact, then add the JCenter repository:
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
...
</repositories>
Building with Gradle
If you’re using Gradle, the following lines should do the trick:
buildscript {
repositories {
jcenter()
mavenLocal()
}
}
dependencies {
compile group: 'org.clapper', name: 'javautil', version: '3.2.0'
...
}
Installing Manually
If you’re not using Maven or Gradle or SBT or something else reasonably sane (e.g., if you’re still using Ant), you’ll have to download the jar and its dependent jars, and install them manually.
The compiled jar is located at https://bintray.com/bmc/maven/download_file?file_path=org%2Fclapper%2Fjavautil%2F3.2.0%2Fjavautil-3.2.0.jar
This software assumes a 1.7 JDK or better, and it depends on the following third-party libraries:
However… you’re much better off using a Maven-aware build tool, such as Maven, SBT or Gradle, if you can.
Documentation
- You can find javadocs for the org.clapper.util library here.
- Also see the CHANGELOG for a list of changes associated with each release.
Building from Source
This software builds with SBT, because I really dislike Maven, and I’m tired of fighting with Gradle.
If you’re building this library from source on a Unix-like system (including
MacOS), you do not need to install SBT, however. The bin/activator
script bundled with the repository will handle that for you. (If you
insist on using Windows, you will have to download SBT first.)
Building
First, clone a copy of the Git repository:
git clone git://github.com/bmc/javautil.git
Then, change your working directory to the newly-created javautil
directory,
and type:
bin/activator package
to compile the code. The resulting jar file will be in ./target
.
If you’re using Windows, bin/activator
may not work, as it is a Bash
script. In that case, download and install SBT.
Then, run:
sbt package
To install it in your local Maven repository, type
bin/activator publish-local
(or sbt publish-local
on Windows).
Copyright and License
This library is copyright © 2004-2017 Brian M. Clapper and is released under a New BSD License.
Patches
I gladly accept patches from their original authors. Feel free to fork the GitHub repository and send me a pull request.
Note: I assume that any pull request is:
- original work of the author, and
- licensed to me for inclusion in the project, under a New BSD License.
If those terms are unacceptable, then don’t send me a PR.