Hello monks!

Recently I have posted a node about JPL (JPL - Embeding Perl into Java for Win32), the main project that integrates Perl and Java, where we are able to call Perl from Java and Java from Perl. But the project is stoped since 2001!!! Actually the project have stoped in a begin stage, and is still a experiment. I have tried to use it on Windows but doesn't work, and for Linux it crashes.

The main idea of JPL is very interesting, since we are able to create a .jpl file that have both Java and Perl methods. We also are able to call directly from Perl Java classes, but for me this is not the point, since we have Inline::Java.

I think that the project have stoped since in the future it won't be necessary, since Parrot will integrate a lot of languages, including Java and Perl. But today I need to use Perl modules from Java, since I have a lot of work done in Perl.

Well, why not create my own Perl and Java enverioment?! Or at least try. I already have worked with Perl embeded into C programs, specially for TinyPerl, so, I have embeded Perl int a .c file, than I linked this C file/functions with the Java VM, and bingo, I was able to evaluate Perl code directly from Java without use any IPC! ;-P

Perl.eval("print 'Hello World!' ;") ;
Than I worked in a way to use Perl objects directly from Java, and now I can use my Perl modules from Java. For now I have XML::Smart working from Java, and everything is fine.

Now I'm thinking to create a intuitive way to use Perl modules from Java, since the interface that I have now is similar to use Perl from C. I don't know if I keep the development of JPL or start my own JPL getting some codes from the old project. The problem of JPL is that it's architecture is very complex, and what I have now wasn't made to be installed into a real Perl distribution, but directly in Java. So, what I should do?

What I have done until now is in this link, and was tested for Win32:
http://www.inf.ufsc.br/~gmpassos/PLJava-DEV-beta.zip

Graciliano M. P.
"Creativity is the expression of the liberty".


In reply to Embeding Perl into Java to use CPAN modules directly from Java by gmpassos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.