Documentation Home
MySQL Connector/J 8.0 Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 465.4Kb
PDF (A4) - 468.7Kb
HTML Download (TGZ) - 113.0Kb
HTML Download (Zip) - 130.6Kb

MySQL Connector/J 8.0 Developer Guide  /  Connector/J Installation  /  Installing from the Development Source Tree

4.4 Installing from the Development Source Tree


Read this section only if you are interested in helping us test our new code. To just get MySQL Connector/J up and running on your system, use a standard binary release distribution.

To install MySQL Connector/J from the development source tree, make sure that you have the following software on your system:

To check out and compile MySQL Connector/J, follow these steps:

  1. Check out the code from the source code repository for MySQL Connector/J located on GitHub at The latest release of the Connector/J 8.0 series is on the release/8.0 branch; use the following command to check it out:

    shell> git clone --branch release/8.0

    Under the current directory, the commands create a mysql-connector-j subdirectory , which contains the code you want.

  2. Make sure that you have JDK 1.8.x installed.

  3. Place the required junit.jar, javaassist.jar, and protobuf-java-x.y.z.jar files in a separate directory—for example, /home/username/ant-extralibs.

  4. Change your current working directory to the mysql-connector-j directory created in step 1 above.

  5. In the directory, create a file named to indicate to Ant the locations of the root directories for your JDK 1.8.x installation, as well as the location of the extra libraries. The file should contain the following property settings, with the path_to_* parts replaced by the appropriate filepaths:

    Alternatively, you can set the values of those properties through the Ant -D options.

  6. Issue the following command to compile the driver and create a .jar file for Connector/J:

    shell> ant dist

    This creates a build directory in the current directory, where all the build output goes. A directory is created under the build directory, whose name includes the version number of the release you are building. That directory contains the sources, the compiled .class files, and a .jar file for deployment. For more information and other possible targets, including those that create a fully packaged distribution, issue the following command:

    shell> ant -projecthelp
  7. Install the newly created .jar file for the JDBC driver as you would install a binary .jar file you download from MySQL by following the instructions given in Section 4.2, “Installing the Driver and Configuring the CLASSPATH.

Note that a package containing both the binary and source code for Connector/J 8.0 can also be downloaded from the Connector/J Download page.


Going from Connector/J 5.1 to 8.0, a number of Ant properties for building Connector/J have been renamed or removed; see Section, “Changes for Build Properties” for details.

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.