Another alternative is Java.pm which allows your Perl process
to communicate with a running JVM either locally or remotely
& do stuff like:
use Java;
my $java = new Java;
my $frame = $java->create_object("java.awt.Frame","My Frame");
$frame->setSize(200,200);
$frame->show;
Available at a CPAN near you or http://www.zzo.com/Java/getit.html
enjoy,
M
------------------------------------------
Mark Ethan Trostler [EMAIL PROTECTED]
Computing Solutions http://www.zzo.com
------------------------------------------
On Fri, 9 Mar 2001, Brian Ingerson wrote:
> Swati Pandit wrote:
> >
> > Hi,
> >
> > We are in the process of installing JPL on Windows. We require an interface
> > from Perl to Java. We have downloaded the perl5.005_03.tar.gz file from the
> > web site search.cpan.org.
>
> You may want to look into Patrick LeBoutillier's new Perl module,
> Inline::Java. This is *brand* new, and probably won't be on CPAN for
> another week, but it is very promising. You can play with a prerelease
> version available at:
>
> http://ttul.org/~patrick
>
> Inline::Java is a very simple way to get from Perl to Java and back. It
> handles converting the basic Perl types to Java objects. Any Java object
> can be passed back to Perl. That object's public methods can then be
> called using Perl method syntax. Here is a simple program:
>
> ----8<----
> use Inline Java;
>
> $j = new JAxH;
> $j->jaxh('Perl');
>
> __END__
> __Java__
> class JAxH {
> public JAxH(){ }
>
> public static void jaxh(String s) {
> System.out.println("Just Another " + s + " Hacker");
> }
> }
> ----8<----
>
> Just run this like any other perl script. As long as 'java' and 'javac'
> are in your path it will work. (You'll need to install Inline.pm as
> well.)
>
> AFAIK, Patrick is just working out some minor Windows issues before
> releasing. So far this module has worked on Solaris, Linux and
> Windows(partially).
>
> Cheers, Brian
>
> --
> perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf
> ("Just Another %s Hacker",x);}};print JAxH+Perl'
>