Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] how to run a protege plugin developed in Netbeans but don't appear unless it's run through Netbeans

swordy sword_stelios at hotmail.com
Sun Mar 29 15:55:19 PDT 2009


I developed a very simple plugin (it's just an example for now) in Netbeans
where I call Protege
and when I run it, a Protege application starts where I choose -> new
project, then OWL/RDF Files and finish and from the choices above ->
Project, Configure and I click the plugin I created which runs smoothly.
All this if I don't modify any options and the jar file is saved in a
Netbean application folder.
But then as you can understand I can't run the plugin from Protege directly
because in the plugins folder of Protege it simply doesn't exist.

1. If I follow the instructions in the site
http://protege.stanford.edu/doc/pdk/plugins/tab_widget.html
which I'm not sure if I follow correctly...
I put the following C:\Program Files\Protege_3.3.1\plugins in Project
Properties, Run, Working directory
and the following -Dprotege.dir=C:\Program Files\Protege_3.3.1\ in Project
Properties, Run, VM Options
and I get this:
run:
java.lang.NoClassDefFoundError: Files\Protege_3/3/1\
Caused by: java.lang.ClassNotFoundException: Files\Protege_3.3.1\
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: Files\Protege_3.3.1\.  Program will exit.
Exception in thread "main" 
Java Result: 1
BUILD SUCCESSFUL

2. If I don't put these options but I go to FILES, <NAME OF MY PROJECT>,
nbproject, project.properties and just put the variable dist.dir=C:/Program
Files/Protege_3.3.1/plugins/<NAME OF MY PLUGIN> which originally is
dist.dir=dist in order the jar file to be put in the plugins folder of
Protege then it calls Protege and runs smoothly (but again only by
Netbeans).
If I just after that turn it off and start Protege, then I'll have
everything doubled (for example in options start a new project there will be
two times OWL/RDF Files and two times OWL/RDF Database and everything else
two times) because of the folder of all the libraries which Netbeans wrote
in the plugins folder along with the jar file.
In that case I can't even choose one and try to see what happens (there's no
finish in OWL/RDF Files)

3. If I manually copy just the jar file which before was created by Netbeans
in the plugins folder of Protege and start Protege then the plugin isn't
there. I mean there's nothing in the configure and I guess this is because
in the jar file it searches to find the libraries from the folder supposedly
Netbeans created and I didn't add for the reason above.

I guess it's something simple but I tried to be the more specific I could.
thanx!
-- 
View this message in context: http://www.nabble.com/how-to-run-a-protege-plugin-developed-in-Netbeans-but-don%27t-appear-unless-it%27s-run-through-Netbeans-tp22773851p22773851.html
Sent from the Protege - OWL mailing list archive at Nabble.com.




More information about the protege-owl mailing list