How to main app access method in plugin

164 views
Skip to first unread message

Lukman Hakim

unread,
Oct 25, 2012, 12:36:08 AM10/25/12
to js...@googlegroups.com
Hi All,,

i'am new in java
does anyone help me how to access method in plugin,
but myPlugin it was export to jar??

thanks

galliv...@gmail.com

unread,
Oct 25, 2012, 2:08:49 PM10/25/12
to js...@googlegroups.com
Lukman,

Can you show a piece of example code that's not working?

Lukman Hakim

unread,
Oct 28, 2012, 11:50:10 PM10/28/12
to js...@googlegroups.com, galliv...@gmail.com
i'm still use a CoolPlugin example,,
how to acces method sayHello in CoolPlugin.jar?
i can't found it in video tutorial,,

thanks

galliv...@gmail.com

unread,
Oct 29, 2012, 2:20:38 PM10/29/12
to js...@googlegroups.com, galliv...@gmail.com
The video tutorial displays:

CoolPlugin plugin = pm.getPlugin(CoolPlugin.class);
System.out.println(plugin.sayHello());

is that what you mean?

Lukman Hakim

unread,
Oct 29, 2012, 11:11:37 PM10/29/12
to js...@googlegroups.com, galliv...@gmail.com
thanks for your response galliv,

yes.. that i mean,, i can call method sayHello(),,
if the coolplugin  package not exported to jar.

but how do i can access method sayHello()
while the code just like this..

PluginManager  pm = PluginManagerFactory.createPluginManager();
pm.addPluginsFrom(new File("plugins/").toURI());

Thanks
Lukman

iyou...@gmail.com

unread,
Oct 9, 2014, 7:40:14 AM10/9/14
to js...@googlegroups.com, galliv...@gmail.com
I need this, how to call method in the jar-ed plugin? 

norber...@gmail.com

unread,
Jan 18, 2017, 1:09:09 AM1/18/17
to jspf, galliv...@gmail.com, iyou...@gmail.com
Hi, I have the same question. Can someone help ?
Reply all
Reply to author
Forward
0 new messages