KELP Compiling and Installation - NetBeans


Table of Contents

1. Instructions
2. Building Kelp classes using JBuilder
Compiling and creating Toolbox archive file
Compile AddinCore files
Compiling and creating KelpAddinForte archive file
3. Building Kelp classes using jakarta-ant
Building Toolbox archive file
4. Implemeting KELP in NetBeans
Preparing jar archives
Setup the IDE class path.

Chapter 1. Instructions

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

  • Compile and create Toolbox archive file toolbox.jar,

  • Compile AddinCore files and

  • Compile and create KelpAddinForte archive file KelpAddinForte.jar.

  • Implemeting KELP in NetBeans

Chapter 2. 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 are 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, 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.

Chapter 3. Building Kelp classes using jakarta-ant

Building of Kelp jar files (toolbox and KelpAddinForte) is ant based process. To compile and build jars (in <Kelp source root>/lib directory), just start

build_kelp_netbeans_with_ant.bat 
or
build_kelp_netbeans_with_ant.sh 
script files (depending on OS - Windows or Linux).

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.1 
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 are 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.1

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

Chapter 4. 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 install add-in manually. 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 careful not to add the KelpAddinForte.jar file to the IDE class path.

Modify ide.cfg and ide.policy as shown:

ide.cfg: Add statement
  
-cp:p C:\Enhydra5.1\lib\build\toolbox.jar;C:\Enhydra5.1\lib\enhydra.jar;C:\Enhydra5.1\lib\xmlc.jar;
C:\Enhydra5.1\lib\xerces.jar; C:\Enhydra5.1\lib\tomcat.jar;C:\Enhydra5.1\lib\core.jar;
C:\Enhydra5.1\lib\gnu-regexp.jar;C:\Enhydra5.1\lib\xhtml.jar;C:\Enhydra5.1\lib\wireless.jar;
C:\Enhydra5.1\build\log4j.jar;C:\Enhydra5.1\lib\build\ejen.jar;C:\Enhydra5.1\lib\build\dods.jar;
C:\Enhydra5.1\lib\dods-runtime.jar;C:\enhydra5.1\lib\tools\Xalan\xalan.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 load 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.