Followed video tutorial to the letter - run failed with classpath problem

91 views
Skip to first unread message

Robert Futrelle

unread,
Feb 5, 2014, 12:12:41 AM2/5/14
to js...@googlegroups.com
When I tried "/bin" I received this suggestion to use "classpath://*" instead.

"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)."

Hello World  <--- System.out - so it did run in spite of my use of "bin/".

main() with "classpath://*" is now:

PluginManager pm = PluginManagerFactory.createPluginManager();

pm.addPluginsFrom(new File("classpath://*").toURI());

CoolPlugin plugin = pm.getPlugin(CoolPlugin.class);

System.out.println(plugin.sayHello());


The run with "classpath://" produced the following error:

Feb 04, 2014 11:51:11 PM net.xeoh.plugins.base.impl.classpath.loader.FileLoader loadFrom

WARNING: Supplied path does not exist. Unable to add plugins from there.

Exception in thread "main" java.lang.NullPointerException

at us.tsos.nlpr.plugins.Main.main(Main.java:19)

I'm *way* out of my depth here - just mindlessly entered the code from the video.

My goal is to create the proper architecture in my Java applications (not web-related)
so they'll accept plugins.   The classpath in my Run configurations just include my project,  JSPF,
and jspf.core-1.0.2.jar

 - Bob
Reply all
Reply to author
Forward
0 new messages