我在我的Java插件系统中使用JSPF框架。我收到了这个错误:
Adding plugins in 'raw' classpaths, such as 'bin/' or 'classes/' is not recommended. Please use classpath://* instead (the video is a bit outdated in this respect).
IPlugin.java
import net.xeoh.plugins.base.Plugin;
public interface IPlugin extends Plugin {
public String handleStuff();
}
Test.java
import net.xeoh.plugins.base.annotations.PluginImplementation;
@PluginImplementation
public class Test implements IPlugin {
public String handleStuff() {
return ("Swag");
}
}
Testing.java/Main class
import java.io.File;
import net.xeoh.plugins.base.PluginManager;
import net.xeoh.plugins.base.impl.PluginManagerFactory;
public class Testing {
public static void main(String[] args) {
PluginManager pm = PluginManagerFactory.createPluginManager();
pm.addPluginsFrom(new File("bin/").toURI());
IPlugin cool = pm.getPlugin(IPlugin.class);
cool.handleStuff();
}
}
请帮帮我