Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Perl from Java

by kapper (Chaplain)
on Jun 26, 2000 at 16:37 UTC ( #19836=perlquestion: print w/replies, xml ) Need Help??

kapper has asked for the wisdom of the Perl Monks concerning the following question:

I am in the midst of creating a typesetting system in Java called SpanDeX =)
For this, it would be great to be able to acces small perl functions for some purposes...

does anybody know of any packages for interfacing perl from java?

I know i could just execute my perl scripts like regular programs and grab the output, but it would be nice with a little more direct access....

Replies are listed 'Best First'.
Re: Perl from Java
by Zoogie (Curate) on Jun 26, 2000 at 18:21 UTC
    I'm not sure about fully interfacing Perl code from Java, but has a product called PerlTools which allows for regular expression parsing (if that's what you're after). I've never tried it personally, but it's worth a shot :)

    - Zoogie

Re: Perl from Java
by BBQ (Deacon) on Jun 26, 2000 at 19:34 UTC
    I posted something on Java and Perl on a somewhat similar question at Java and Perl Harnessed. I never got any feedback from the person that asked the question, so I can't tell if it was of any help or not. If you would be so kind as to let us know if you found it useful, that would be great!

    The originating node was Perl to Java.

    # Trust no1!

      Just had a look at it...
      It's mostly a description of how one would create a native interface between Java and a Perl. Which is what I was hoping somebody had allready done =)

      It does however give some ok thoughts about how one might create a link between Java and Perl Scalar values...

Re: Perl from Java
by pemungkah (Priest) on Jun 29, 2000 at 01:42 UTC
    You may want to take a look at the Java module on CPAN. To quote directly from the README:
    This module allows you to talk to a JVM on a local or remote machine.You can create objects, call functions, access fields, deal with arrays, get events, & all the nonsense you can do in Java - from Perl!
    You run a "JavaServer" program on the machine to which the Java module is to talk, and then code stuff like:
    use Java;
    $java = new Java;
    $frame = $java->create_object("java.awt.Frame","Title");
    And so on. This is really quite interesting, but it is not particularly secure, as far as I can see. I suppose this is an "opportunity to excel", as they say. I think this may do what you're looking for. It does, however, seem to imply that you'll be doing all of the programming on the Perl side. Not that there's anything wrong with that. More like a feature, actually.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://19836]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (1)
As of 2021-12-08 18:40 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (36 votes). Check out past polls.