See http://protege.stanford.edu/doc/pdk/plugins/debugging.html.
- Copy protege.jar and looks.jar from <Protege_Dir> to your <Project>/lib folder and add them to your class path.
- Set Project working directory to <Protege_Dir>.
- Create a custom manifest:
- Create <Project>/src/META-INF folder
- Inside META-INF create MANIFEST.MF file
- Put the following in MANIFEST.MF:
-
Manifest-Version: 1.0
Name: this.is.a.package.MainClassName.class
Tab-Widget: True
- Open <Project>/nbproject/project.properties. Set manifest.file=src/META-INF/MANIFEST.MF
Protege Plugin can now be run and debugged from within Netbeans.
On Ubuntu, after running project in debug mode, Protege
can no longer be run outside of Netbeans. This problem does not occur on Windows.If using OWL Plugin, then you must remove the owl plugin from the plugins folder. Otherwise you will get duplicate
plugin warnings. This will disable the OWL Plugin when Protege is run outside of Netbeans.To deploy (copy the generated .jar file and any other necessary .jar files) to <Protege_Dir>/plugins, put the
following in <Project>/build.xml:<target name=”-post-jar” description=”copy jar to plugins dir”>
<copy file=”dist/Project.jar” todir=”${work.dir}/plugins/this.is.a.package”/>
<copy file=”dist/lib/abc.jar” todir=”${work.dir}/plugins/this.is.a.package/lib”/>
<copy file=”dist/lib/xyz.jar” todir=”${work.dir}/plugins/this.is.a.package/lib”/>
</target>
When debugging, comment out the deployment code in build.xml. Otherwise warnings about duplicated plugins appear when
running Protege from Netbeans.
