If you're only planning on
using CSRTool, then you do not need to build it. The
csrtool-01-BuildXX-bin.zip file contains compiled jar files that will execute with just the addition of the BouncyCastle JCE Provider v1.35 and the JRE 1.5.0_9 (or greater). All you have to do is:
- Unzip the zip file (which will extract the contents in a csrtool directory)
- Copy the bcprov-jdk15-135.jar to the csrtool/lib directory; and
- Execute the csrtool.jar file with: java -jar csrtool.jar to start the tool
However, if you want to
build CSRTool from scratch, and/or modify it for your own use and rebuild it, then you need to do the following:
Getting the tools- Get the JDK 1.5.0_9 (or above) from http://java.sun.com
- Get NetBeans 5.5 from http://www.netbeans.org. While you could muck around with the build.xml files to avoid this, the time spent modifying build.xml will exceed the time spent downloading NetBeans, installing it and using it - save yourself the grief
- Get the BouncyCastle JCE Provider 1.35 for JDK 1.5 from http://www.bouncycastle.org
- Extract the csrtool-01-BuildXX-src.zip file, which will create a csrtool directory in the extracted location
Fixing the location of the BouncyCastle JCE Provider- Startup NetBeans and Open a Project; point NetBeans to the csrtool directory from the previous step
- When the csrtool project opens up, right-click on csrtool in the Projects tab, and select Properties
- Select Libraries from the pop-up window
- See if the configured location of bcprov-jdk15-135.jar matches the location of your copy of the BC jar
- If it does, then click Cancel; if it does not match your location, you can either copy bcprov-jdk15-135.jar to that location, or delete this entry and create a new library entry and point your NetBeans configuration to where you have your BC JCE Provider jar. Select OK when complete
Fixing the locationn where the distribution is created- Select the Files tab in NetBeans, and expand csrtool, then expand nbproject and finally expand private
- Right-click on the private.properties file and select Edit
- Modify the property work.dir in this file, to reflect the location where the csrtool source was extracted on your computer. The default location in the file is /usr/local/workspace/csrtool/dist; however, if you unzipped the source zip file into a directory called c:\temp\csrtool, then you should change work.dir to c:\\temp\\csrtool\\dist or c:/temp/csrtool/dist (don't miss the double back-slashes for the Windows-style directory separator). NetBeans will create the newly-built distribution in this directory
- Save the edits and switch back to the Projects tab
Building csrtool- Build csrtool by right-clicking on csrtool and selecting Build Project. The jar files are created in a subdirectory of csrtool called dist, while a zipped copy of the binary and source distribution (with your modifications, if any) is created in a subdirectory called zip
- Run the tool by right-clicking on csrtool and selecting Run Project, or from a Shell/CommandTool window, go into the csrtool/dist directory and run csrtool by typing: java -jar csrtool.jar
Note:
If you'd prefer to use JDK6, you can do so; however, you will have to get the BC JCE Provider 1.35 for JDK6 and modify the Properties for csrtool in NetBeans to use the Java 1.6 platform before rebuilding. (Right-click
csrtool, select
Properties, select
Libraries, pull down the
Java Platform list and change the selection to JDK 1.6; if 1.6 is not visible in the list, you have to click
Manage Platforms, select
Add Platform from the pop-up window, specify the location of your JDK6 directory and close the wizard. You will then be able to select the JDK6 platform for the build process).