On Mon, 16 Dec 2002, Patrick LeBoutillier wrote: > Doug, > > I'll put the patch in for sure. It will be in the next release.
cool, thanks. > If I understand correctly you are going from Java to Perl via JNI > and then using Inline::Java to return to Java? If that is the case > I'm really interested in knowing a bit more about your project. the project is a commercial product, mostly java with some native code. we have several java plugin interfaces, i'd like to provide the option for writing plugins in Perl. this will likely just be docs/examples on how to use Inline::Java and the piece mentioned below. unlikely we'd actually ship this stuff with the product, at least not for the first release. > >From Inline::Java you can start from Perl and go to Java and then even > callback to Perl, but often people ask me if the whole process can > start in Java-land. I think JPL could do that, is that what you use to > load up the PerlInterpreter in the first place? i looked at JPL briefly a while back from the 5.8.0 release. it doesn't compile with ithreads, nor is it thread safe from what i can see. the piece i have replaced is PerlInterpreter/PerlInterpreter.{c,java}. seems this has only ever been used on platforms that support dlopen(), i need to support hpux and win32 as well. also requires environment variables to locate PerlInterpreter.so. these are also platform specific when using System.loadLibrary (LD_LIBRARY_PATH on linux/solaris, SHLIB_PATH on hpux, PATH on win32). the replacement i have also supports perl_clone underneath, should one want to use perl in concurrently. i think the patch to jpl to make it usable would be bigger than the replacement. i will put this piece on cpan at some point. seems Inline::Java can replace the rest of jpl's functionality. > The CLASSPATH issue is always problematic. In your case it will be > even more so because you will need to set it even before Tomcat or > Weblogic starts. it can be added at runtime, provide the classloader is derived from URLClassLoader (which i believe most are), using the addURL method. > One thing that will interest you is that using Inline's NAME configuration > parameter in combination with the DIRECTORY parameter in your > 'use Inline Java' statement will give a more predictable path for the .class > files: > > Ex: > > use Inline ( > Java => "DATA", > DIRECTORY => '/some/dir', > NAME => 'MyStuff', > ... > ) ; > > This will place the class files in '/some/dir/lib/auto/MyStuff/' which might > be > better than something like '_Inline/lib/auto/test_pl_13db'. nice, thanks.