I recently started creating a few OpenTools for JBuilder. One of the instructions you see when you first start creating an OpenTool is that you need to modify your JBuilder classpath during OpenTool development so the classpath includes the location of your OpenTool files. But, the instructions I found were for old versions of JBuilder (that were no longer valid), which leads to the question "How can I modify the JBuilder
CLASSPATH to recognize the location of my custom class files?"
All you have to do is modify your
jbuilder.config file. This file is located in the bin directory of your JBuilder installation, or at least that's where it is in JBuilder8 through JBuilder X. Here's how to make the change on JBuilder X:
- First, if it's already running, shut down JBuilder.
- Second, make a backup copy of this file.
- Next, go to the section of the file where you see "
addpath" commands. For instance, in my file I found one line that looks like this:
- Right after the last
addpathcommand, add a new line for your command. To include my OpenTool in the classpath, I added this line:
- Now when you restart JBuilder your
CLASSPATHwill be altered. It's easy to tell if this succeeded when you are creating an OpenTool. The way you know that this works with OpenTool development is that you should be able to access your OpenTool if you've done everything right.