This is a short guide to configuring NetBeans to develop
NetKernel modules. This guide relates to NetBeans 3.6 which although not current
works best for NetKernel development due to it's flexible classpath configuration.
- Add
[install]/lib/1060netkernel-bootloader-*.*.*.jar
to your project classpath. (In the filesystem view right-click on the Filesystems
entry and select the menu item Mount->Archive Files)
- Add
[install]/lib/1060NetKernel-*.*.*.jar
to your project classpath.
-
Add the module
[install]/modules/ext-layer1-*.*.*.jar
to your project classpath.
- Create a directory which will be the root directory for your module under
[install]/modules/
and add this directory to your classpath.
At this stage you might wish to use the New Module Wizard
to create a stubbed out module.
- If you didn't use the module wizard then now register the path to your module in
[install]/etc/deployedModules.xml
.
-
If your module uses other jar libraries,
place these in a directory named
/lib/
in your module.
For development you must add these to your project classpath - ensure these are selected for "build" but at runtime they will be
picked up automatically through NetKernel's dynamic module classpath.
- Build your module's classes using your IDE into the same directory as the source.
- Add the JVM flag
-Dbootloader.basepath=[install]
to set the basepath of the NetKernel installation.
- Add the JVM flag
-Djava.endorsed.dirs=[install]/lib/endorsed/
to ensure the correct XML libraries are used by the JDK.
- Add the JVM flag
-Dbootloader.jarDir=[install]/lib/ext/
to supply additional standard jars to the NetKernel runtime.
-
Boot NetKernel by executing
com.ten60.netkernel.bootloader.BootLoader
in the 1060NetKernel-bootloader-*.*.*.jar.
Your Java execution command should look something like:
java -Dbootloader.basepath=[install] -Djava.endorsed.dirs=[install]/lib/endorsed/ -Dbootloader.jarDir=[install]/lib/ext/ -cp [install]/lib/1060netkernel-bootloader-*.*.*.jar com.ten60.netkernel.bootloader.BootLoader
You can add any number of module directories to the [install]/modules/
directory.
Each new module directory should be added to your IDE classpath
and registered in [install]/etc/deployedModules.xml
.
Java classes you add to each module should be compiled against the kernel and the libraries
you added to your classpath.
Remember that each module is an independent entity
so it is essential to place the compiled class files in the same directory
as the source files.