How to add a plugin to JNode

This page will describe how to add a java program to JNode as plugin, so that it can be called via its alias.

First of all you need to set up Eclipse (or your favorit IDE) as described in the readme, so that JNode builds without errors and you can use it (e.g. use JNode in VMWare).

There are different ways of extending JNode with a plugin.
A plugin can contain a class that extends Plugin and (or) normal java programs.
Every plugin is described by a descriptor.

For our example we will develop a plugin that contains a normal java program.

We need a name for our plugin : we will use sample, wich is also the packagename of our plugin.
It belongs to one of the JNodes subprojects in our case we will use the ordername sample in the shell subproject.

Every java-file for our plugin has to be in (or in subfolders):


(for me it is d:\jnode\shell\src\shell\org\jnode\shell\sample)

Now we will write a small wich will be one of our plugin programs.
Here is the source of the file :


public class HelloWorld{

        public static void main(String[] args){

            System.out.println(“HelloWorld –“);



thats ok, but it will not be build until we create a descriptor and add our plugin to the JNode full-plugin-list.xml.

The plugin descriptor ( stored in the descriptors folder of the shell subproject) and looks like this :

<?xml version="1.0" encoding="UTF-8"? >

<!DOCTYPE plugin SYSTEM "jnode.dtd">

<plugin id=""

            name="Sample Plugin"





            <import plugin=""/>



            <library name="jnode-shell.jar">

                        <export name="*"/>



<extension point="">

            <alias name="HelloWorld" class=""/>



Now we need to add our Plugin to the JNode full-plugin-list.xml, this file is located in jnode\all\conf your entry should look like this :


            <plugin id="org.jnode.util"/>

            <plugin id="org.jnode.vm"/>

            <plugin id="org.jnode.vm.core"/>

            <plugin id=""/>


thats it, you can now build JNode and test your HelloWorld plugin by typing HelloWorld.

What we can do now is add „normal“ programs to JNode via its provided Pluginstructure.

It doesn't works

Hi I followed the example and It doesn't works, I wonder if the example miss something like modify the build.xml to complete the sample?