NetBeansNetBeans
Setting up your development environment
Home > Books > Tutorials and Training Guides > Fundamentals Practicalites > NetBeans

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


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.

  1. 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)
  2. Add [install]/lib/1060NetKernel-*.*.*.jar to your project classpath.
  3. Add the module [install]/modules/ext-layer1-*.*.*.jar to your project classpath.
  4. 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.
  5. If you didn't use the module wizard then now register the path to your module in [install]/etc/deployedModules.xml.
  6. 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.
  7. Build your module's classes using your IDE into the same directory as the source.
  8. Add the JVM flag -Dbootloader.basepath=[install] to set the basepath of the NetKernel installation.
  9. Add the JVM flag -Djava.endorsed.dirs=[install]/lib/endorsed/ to ensure the correct XML libraries are used by the JDK.
  10. Add the JVM flag -Dbootloader.jarDir=[install]/lib/ext/ to supply additional standard jars to the NetKernel runtime.
  11. 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.

© 2003-2007, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.