| 1 |
INTRODUCTION: |
| 2 |
|
| 3 |
Inline::Java - Write Perl classes in Java. |
| 4 |
|
| 5 |
Inline::Java lets you write Perl classes in Java. |
| 6 |
|
| 7 |
Example: |
| 8 |
|
| 9 |
use Inline Java => <<'END'; |
| 10 |
class JAxH { |
| 11 |
public JAxH(String x){ |
| 12 |
System.out.println("Just Another " + x + " Hacker") ; |
| 13 |
} |
| 14 |
} |
| 15 |
END |
| 16 |
|
| 17 |
new JAxH('Inline') ; |
| 18 |
|
| 19 |
When run, this complete program prints: |
| 20 |
|
| 21 |
Just Another Inline Hacker |
| 22 |
|
| 23 |
|
| 24 |
------------------------------------------------------------------------------- |
| 25 |
JNI (JAVA NATIVE INTERFACE) EXTENSION: |
| 26 |
|
| 27 |
Inline::Java now provides a JNI extension that allows you to load the Java |
| 28 |
virtual machine as shared object instead of running it as a separate process. |
| 29 |
|
| 30 |
See README.JNI for more information on building the JNI extension. |
| 31 |
|
| 32 |
|
| 33 |
------------------------------------------------------------------------------- |
| 34 |
INSTALLATION: |
| 35 |
|
| 36 |
- This module requires Inline version 0.44 or higher to be installed. |
| 37 |
- It also requires a version of the Java SDK 1.2 or higher to be |
| 38 |
installed. You can get the latest Java SDK from Sun Microsystems |
| 39 |
at http://java.sun.com. Follow the provided instructions in order |
| 40 |
to install the Java SDK properly. |
| 41 |
|
| 42 |
To install Inline::Java do this: |
| 43 |
|
| 44 |
% perl Makefile.PL J2SDK=/your/java/dir (see Note 1) |
| 45 |
% make (see Note 2) |
| 46 |
% make test (see Note 3, 4) |
| 47 |
% make install |
| 48 |
|
| 49 |
You have to 'make install' before you can run it successfully. |
| 50 |
|
| 51 |
Note 1: Under Win95/98/Me, you may need to do 'cd ..' to get back to the |
| 52 |
your original directory after the command has completed. Also, you may set |
| 53 |
either the JAVA_HOME or the PERL_INLINE_JAVA_J2SDK environment variable to |
| 54 |
/your/java/dir instead of using the J2SDK Makefile.PL parameter. |
| 55 |
|
| 56 |
Note 2: Use nmake on Win32. |
| 57 |
|
| 58 |
Note 3: If you have built the JNI extension and want the test suite to use |
| 59 |
it, you will need to set the PERL_INLINE_JAVA_JNI environment variable to 1 |
| 60 |
BEFORE running 'make test'. |
| 61 |
|
| 62 |
Note 4: When testing Inline::Java, it's always a good idea to run 'make test' |
| 63 |
twice. The first time you test the building and loading of a module, the |
| 64 |
second time you test loading of an already built module. |
| 65 |
|
| 66 |
|
| 67 |
------------------------------------------------------------------------------- |
| 68 |
FEATURES FOR THIS VERSION: |
| 69 |
|
| 70 |
Inline::Java version 0.52 is a minor upgrade that includes: |
| 71 |
- Fixed JNI on cygwin (many thanks to Eric Rybski for the patch) |
| 72 |
- Improved installation. 'make java' is now performed automatically. |
| 73 |
- Fixed problems with disappearing exceptions by localizing $@. |
| 74 |
- Other minor bug fixes. |
| 75 |
|
| 76 |
See CHANGES for a full change list. |
| 77 |
|
| 78 |
------------------------------------------------------------------------------- |
| 79 |
INFORMATION: |
| 80 |
|
| 81 |
= For more information on Inline::Java, see 'perldoc Inline::Java'. |
| 82 |
= For information about Inline, see 'perldoc Inline'. |
| 83 |
= For information on using Java, visit http://java.sun.org. |
| 84 |
|
| 85 |
Inline::Java's mailing list is [email protected]. |
| 86 |
To subscribe, send an email to [email protected]. |
| 87 |
|
| 88 |
Please send questions and comments to Patrick LeBoutillier <[email protected]>. |
| 89 |
|
| 90 |
Copyright (c) 2001-2005, Patrick LeBoutillier. All Rights Reserved. |