KELP Compiling and Installation - NetBeans

To compile and install KELP in NetBeans 3.3.1 and 3.3.2 there have to be done:

  1. Compile and create Toolbox archive file toolbox.jar,

  2. Compile AddinCore files and

  3. Compile and create KelpAddinForte archive file KelpAddinForte.jar.

  4. Implemeting KELP in NetBeans


 

Building Kelp classes using JBuilder

Compiling and creating Toolbox archive file

In <Kelp source root>\modules\Toolbox directory is Toolbox.jpr project file. Required libraries for compiling Toolbox project is xmlc.jar and xerces.jar. Compile files in this project and build java classes (in \modules\Toolbox\classees directory). To create Toolbox archive file you have to run bulid_Toolbox.bat(in \modules\Toolbox\classees directory).

Compile AddinCore files

In <Kelp source root>\modules\AddinCore directory is AddinCore.jpx project file. Required libraries for compiling AddinCore project are: xmlc.jar and xerces.jar, and toolbox.jar.

Compiling and creating KelpAddinForte archive file

In <Kelp source root>\modules\AddinForte directory is AddinForte.jpx project file. Required libraries for compiling AddinForte project are: xmlc.jar, toolbox.jar, path to AddinCore output files and NetBeans archive files text.jar, image.jar, java.jar and openide.jar, (its location is in <NetBeans root>\modules and <NetBeans root>\lib directory). To create KelpAddinForte archive file you have to rebuild KelpAddinForte.jar file in AddinForte project.


Building Kelp classes using jakarta-ant

In <Kelp source root> directory is build_NetBeans.xml file. This file is used by ant for compiling and creating archive files. All that you have to do is to start this building process is to call build_Kelp_netbeans_with_ant.bat file in <Kelp source root> directory.

Before that, you have to set JDK_HOME variable (directory of your JDK installation) in build_kelp_with_ant.bat:

set JDK_HOME=c:\jdk1.3.1

and enhydra.root (root directory of Enhydra installation) and netbeans.root(root directory of NetBeans installation) in kelp.properties file:

enhydra.root=/Enhydra5.0
netbeans.root=/netbeans

Ant build process creates two archive (jar) files in <Kelp source root>/lib; directory: toolbox.jar and KelpAddinForte.jar.
All required jar files for build using jakarta-ant is situated in <Kelp source root> directory.

Building Toolbox archive file

If you want to generate only toolbox classes and archive files (not AddinKelp.jar), just start build_toolbox_with_ant.bat file in <Kelp source root>\modules\Toolbox directory. Before that, you have to set JDK_HOME variable (directory of your JDK installation) in build_toolbox_with_ant.bat:

set JDK_HOME=c:\jdk1.3.1

and enhydra.root (root directory of Enhydra installation) in kelp.properties file:

enhydra.root=/Enhydra5.0

Ant build process creates archive (jar) file in <Kelp source root>/lib; directory: toolbox.jar.
All required jar files for build using jakarta-ant is situated in <Kelp source root> directory.

Implemeting KELP in NetBeans

Preparing jar archives

Follow the steps below if the add-in does not appear to be functioning properly after using the installer, or if you want to manualy install add-in. Note that when manually configuring NetBeans, you will be modifying your existing configuration files instead of using the Kelp provided installer.

Setup the IDE class path.

Add the toolbox.jar and enhydra.jar to your IDE class path. NetBeans includes a configuration file that you can use to add jars to the IDE class path. With NetBeans closed, edit the ide.cfg to add toolbox.jar and enhydra.jar into the IDE class path. Be sure not to add the KelpAddinForte.jar file to the IDE class path.

Windows
Modify ide.cfg and ide.policy as shown:

ide.cfg: Add statement

-cp:p C:\
Enhydra5.0\lib\build\toolbox.jar;C:\Enhydra5.0\lib\enhydra.jar;C:\Enhydra5.0\lib\xmlc.jar;C:\Enhydra5.0\lib\xerces.jar; C:\Enhydra5.0\lib\tomcat.jar;C:\Enhydra5.0\lib\core.jar;C:\Enhydra5.0\lib\gnu-regexp-1.1.4.jar

at the end of the line with NetBeans startup options (usualy first and only line).

ide.policy: Add statement

grant {
permission java.security.AllPermission;
};

at the begining of the file.

Copy the KelpAddinForte.jar file to the
/modules directory.
NetBeans automatically loads jars from the modules directory using a separate class loader than is used for the IDE class path. Modules will not function properly if added to the IDE class path directly through the IDE configuration file.