This section discusses how to obtain MySQL NDB Cluster Connector for Java sources, binaries, compiling, installing, getting started.
Obtaining MySQL NDB Cluster Connector for Java. You can obtain the most recent NDB Cluster release incorporating MySQL NDB Cluster Connector for Java from downloads.mysql.com.
Building and installing MySQL NDB Cluster Connector for Java from source.
You can build and install ClusterJ as part of building and
installing NDB Cluster, which always requires you to configure
the build using a
--with-plugins option that
NDB support to be included,
--with-plugins=max. Among the list of values
you use for the
clusterj is required for building NDB Cluster
with ClusterJ support.
In addition, you should use the following configure option when configuring a build to include ClusterJ:
--with-extra-charsets: ClusterJ uses the
ucs2character set for internal storage, and ClusterJ cannot be built without it. The simplest way to ensure that this character set is available is to configure using
--with-extra-charsets=all. This is what we recommend that you use, unless you have some reason for not wanting to include all character sets, in which case you should make sure that
ucs2is specified in the character set list passed to this option.
A typical configuration step in building NDB Cluster with support for both ClusterJ might look like this:
shell> ./configure --with-plugins=ndbcluster,clusterj \ --with-extra-charsets=all \ --prefix=path/to/install/directory
Not all available options for configuring an NDB Cluster build are shown in this section. For information about other options that can be used, see Installing MySQL Using a Development Source Tree, or consult the output of configure --help.
After configuring the build, run
make install as you normally
would to compile and install the NDB Cluster software. Following
installation, the MySQL NDB Cluster Connector for Java jar files can be found in
share/mysql/java under the MySQL installation
directory (by default, this is
You can also use the included file
storage/ndb/clusterj/pom.xml for building
ClusterJ with Maven.
Setting up your build environment to use Maven requires that you
run mvn install in the
clusterj directory. Assuming that you are
already in the root directory of the NDB Cluster source tree, you
can accomplish this by performing in your shell the steps shown
cd storage/ndb/clusterj mvn install
This causes ClusterJ to be built, with the resulting
.jar files installed in the local repository.
MySQL NDB Cluster Connector for Java jar files.
After building and installing NDB Cluster with MySQL NDB Cluster Connector for Java, you
should find the following JAR files that are needed for using
share/mysql/java/ under the NDB
Cluster installation directory:
clusterj-api.jar: This is the compile-time jar file, required for compiling ClusterJ application code.
clusterj.jar: This is the runtime library required for executing ClusterJ applications.