magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 10 > Lab Note  

A Look Inside the O'Reilly Perl Resource Kit

By Brian Jepson

The Java-Perl Library (JPL) written by Larry Wall, provides runtime linkage between Perl and Java. With JPL, you can embed Perl within Java. In theory, you can also embed Java within Perl, but a deficiency in the current Sun JDK makes this difficult (more on this later).

This article will demonstrate how you can use JPL with Java servlets to get the best of both worlds. It's like mixing up servlets with mod_perl. I decided to use mod_jserv, because it's freely redistributable, it's my favorite servlet engine, and it runs on my favorite Web server (Apache).

What is JPL?

More importantly, what isn't JPL? Most importantly, it's not a tool for turning Perl code into Java bytecode or for turning Java code into Perl bytecode.

JPL provides nearly seamless mapping between Java and Perl. Behind the scenes, JPL converts Perl data types into sensible Java equivalents (and vice versa). JPL is part of O'Reilly & Associates' UNIX Perl Resource Kit. In a nutshell, JPL lets you combine the best of Perl and Java in a relatively painless fashion.

Before We Dive In

Before we see JPL in action, let's start out with a simple Perl program, which we'll port to JPL so we can take advantage of Java's graphical user interface.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2