This is an automated email from the git hooks/post-receive script. js pushed a commit to tag 0.55 in repository libinline-java-perl.
commit 5accbd89df45acfc6dc5c8017dfae06899032fe9 Author: Patrick LeBoutillier <p...@cpan.org> Date: Wed Dec 19 21:58:44 2001 +0000 *** empty log message *** --- README | 16 ++++++++++------ README.JNI | 18 +++++++++--------- t/13_callbacks.t | 26 +++++++++++++++++++++++++- 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/README b/README index ddec173..3486b67 100644 --- a/README +++ b/README @@ -26,9 +26,9 @@ JNI (JAVA NATIVE INTERFACE) EXTENSION: Inline::Java now provides a JNI extension that allows you to load the Java virtual machine as shared object instead of running it as a separate process. -This extension works without problems on MSWin32 systems, but requires -rebuilding Perl on Solaris (and possibly in Linux as well) because of -threading issues. +This extension works without problems on MSWin32 systems, pretty well on +Linux (there are some threding issues), but requires rebuilding Perl on +Solaris (and possibly in Linux as well) because of threading issues. See README.JNI for more information on building the JNI extension. @@ -36,7 +36,7 @@ See README.JNI for more information on building the JNI extension. ------------------------------------------------------------------------------- INSTALLATION: -- This module requires Inline version 0.41 or higher to be installed. +- This module requires Inline version 0.43 or higher to be installed. - It also requires a version of the Java SDK 1.2 or higher to be installed. You can get the latest Java SDK from Sun Microsystems at http://java.sun.com. Follow the provided instructions in order @@ -60,8 +60,7 @@ to a true value. You also will need set this whenever you use the module later on. Note 2: On Win95/98/Me, you might get and error when doing 'nmake'. If so, -edit 'Makefile' and go the the indicated line. Remove the '@[' and ']' lines -around the 'subdirs' rule's commands. Rerun 'nmake'. +rerun 'perl Makefile.PL' adding the 'fix' option, i.e. 'perl Makefile.PL fix'. Note 3: In order for 'make test' to run properly, you should put the directory to your Java binaries in either your PATH environment variable @@ -81,6 +80,7 @@ that forks, you may wish to run 'perl shared_jvm_test.pl'. This will simulate a forking process that uses Inline::Java. Please keep in mind that this test does not work under Windows. + ------------------------------------------------------------------------------- FEATURES: @@ -88,6 +88,10 @@ WARNING: THIS IS ALPHA SOFTWARE. It is incomplete and possibly unreliable. It is also possible that some elements of the interface (API) will change in future releases. +Inline::Java version 0.31 is a minor upgrade that includes: ++ Exception handling (Perl can 'catch' Java exceptions) ++ Callbacks to Perl from Java + Inline::Java version 0.30 is a major upgrade that includes: + Multi-threaded JVM + Shared JVM mode for forking programs, i.e. mod_perl diff --git a/README.JNI b/README.JNI index 273305e..e1a1b8b 100644 --- a/README.JNI +++ b/README.JNI @@ -5,11 +5,10 @@ JNI (JAVA NATIVE INTERFACE) EXTENSION PLATFORM AVAILABILITY --------------------- -The JNI extension is available on all platforms, but has been run -succesfully only on Win32 and Solaris. +The JNI extension is available on all platforms. -The extension builds properly on all platform, but problems occurs when -running it. +The extension builds properly on all platform, but problems can occur when +running it on certain platforms. WIN32 ----- @@ -49,10 +48,12 @@ Then use this Perl version to build and run Inline::Java. LINUX ----- -The JNI extension has been run successfully on Linux. For this you need -to use Java with native threads. To do this you need to inspect your -Java 2 SDK distribution tree, and put in your LD_LIBRARY_PATH the directories -that contain 'native_threads' instead of those that contain 'green_threads'. +The JNI extension has been run successfully on Linux, but some runtime +problems can occur depending on Java 2 SDK version and other factors. +For best results you need to use Java 1.2.2 with native threads. To do +this you need to inspect your Java 2 SDK distribution tree, and put in +your LD_LIBRARY_PATH the directories that contain 'native_threads' instead +of those that contain 'green_threads'. You should also use any directory that says 'classic' instead of the others. The Classic VM seems to run better under Linux. @@ -64,7 +65,6 @@ On my Linux box, here's what I used as LD_LIBRARY_PATH: /home/patrickl/apps/jdk1.2.2/jre/lib/i386/native_threads - BUILDING THE JNI EXTENSION -------------------------- diff --git a/t/13_callbacks.t b/t/13_callbacks.t index 418feac..1cbee7e 100644 --- a/t/13_callbacks.t +++ b/t/13_callbacks.t @@ -14,7 +14,7 @@ use Inline::Java qw(caught) ; BEGIN { - plan(tests => 17) ; + plan(tests => 19) ; } my $t = new t10() ; @@ -55,6 +55,10 @@ my $t = new t10() ; ok($msg, "throw java twister") ; eval {$t->bug()} ; ok($@, qr/^bug/) ; + + ok($t->perlt()->add(5, 6), 11) ; + + eval {$t->perldummy()} ; ok($@, qr/Can't propagate non-/) ; } ; if ($@){ if (caught("java.lang.Throwable")){ @@ -130,6 +134,16 @@ sub twister { } +sub t { + return $t ; +} + + +sub dummy { + die(bless({}, "Inline::Java::dummy")) ; +} + + __END__ __Java__ @@ -250,5 +264,15 @@ class t10 extends InlineJavaPerlCaller { throw new InlineJavaException( InlineJavaServer.instance. new InlineJavaException("bug")) ; } + + + public Object perlt() throws InlineJavaException, PerlException, OwnException { + return CallPerl("main", "t", null) ; + } + + + public Object perldummy() throws InlineJavaException, PerlException, OwnException { + return CallPerl("main", "dummy", null) ; + } } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits