Making a Plugin-Able Processing Application
in
Contributed Library Questions
•
9 months ago
I wanted to make a Plugin-Able application that created a new folder in the Documents and looks for plugins there, if finds loads and runs them.
I tried to use the ClassLoaders in Java but they were a bit complicated for me. Then I download the JSPF lib and integrated it. Though it is working for the plugin you get with lib itself (coolplugin.jar) but I'm not able to create my own plugins. I have tried both Processing as an IDE and used simple Java from other IDEs.
What I want is to be albe to make plugins compatible with JSPF from Processing only.
Here is come code I have been using to load .jar files and add plugins (it works fine) -
-
import java.io.* ;
-
import java.util.* ;
-
import java.net.* ;
-
import java.lang.reflect.* ;
-
import java.lang.Object.* ;
-
import net.xeoh.plugins.base.* ;
-
-
-
void setup ( ) {
-
size ( 800, 500 ) ;
-
PluginManager pm = PluginManagerFactory. createPluginManager ( ) ;
-
if ( !dir. exists ( ) ) {
-
println ( "The new folder is created." ) ;
-
dir. mkdir ( ) ;
-
}
-
for ( int i = 0 ; i <= Child. length - 1 ; i ++ ) {
-
println (Child [i ] ) ;
-
}
-
for ( int i = 0 ; i <= Child. length - 1 ; i ++ ) {
-
println (Source ) ;
-
}
-
}
-
-
void draw ( ) {
-
}
-
-
List <String > folderNames = new ArrayList <String > ( ) ;
-
-
if (f. isDirectory ( ) ) {
-
folderNames. add (f. getName ( ) ) ;
-
}
-
}
-
}
Thanks.
1