java plugin: Replace dots ('.') with slashes ('/') when loading a class.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 28 May 2009 10:10:42 +0000 (12:10 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 28 May 2009 10:10:42 +0000 (12:10 +0200)
commit2450298205d926c2679bd5fd2b25a614112436a0
tree57d4a7704d0b80dfe5e8628d46652a1dca033cca
parent9ae4ff9053e3ae8923db028b75669fcda19eb4ae
java plugin: Replace dots ('.') with slashes ('/') when loading a class.

Thanks to Randy Rizun for pointing this out:

Hi!

just wanted to point out an issue in cjni_config_load_plugin

the call to FindClass passes the "Name" verbatim from the LoadPlugin directive

one might intuitively say LoadPlugin "com.foobar.Plugin"

whereas FindClass wants to see it as "com/foobar/Plugin"

so I guess either (a) document LoadPlugin to say to use slashes or (b)
subst / for . in cjni_config_load_plugin or (c) something else?!?

of course, everything works fine if my plugin is in the 'default' java
package (i.e., no package name) =)

either way, thanks a lot for the great work!!

-Randy
src/java.c