[libinline-java-perl] 382/398: ok

Jonas Smedegaard dr at jones.dk
Thu Feb 26 11:43:27 UTC 2015


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 f6b81d53fc7cb196b9e479f188aed59140e672be
Author: patrick_leb <>
Date:   Wed Jan 17 01:55:09 2007 +0000

    ok
---
 CHANGES                                            |  8 ++++-
 Java.pm                                            |  7 ++++-
 Java.pod                                           | 16 ++++++++--
 Java/Array.pm                                      |  2 +-
 Java/Callback.pm                                   |  2 +-
 Java/Class.pm                                      |  2 +-
 Java/Handle.pm                                     | 17 ++++++-----
 Java/JNI.pm                                        |  2 +-
 Java/JNI.xs                                        |  3 ++
 Java/JVM.pm                                        |  2 +-
 Java/Makefile.PL                                   |  8 +++++
 Java/Object.pm                                     | 33 +++++++--------------
 Java/PerlInterpreter/Makefile.PL                   |  1 +
 Java/PerlInterpreter/PerlInterpreter.pm            |  2 +-
 Java/PerlInterpreter/PerlInterpreter.xs            |  3 ++
 Java/PerlInterpreter/t/02_perl_interpreter.t       |  7 +++++
 Java/PerlNatives/Makefile.PL                       |  3 ++
 Java/PerlNatives/PerlNatives.pm                    |  2 +-
 Java/PerlNatives/PerlNatives.xs                    |  4 ++-
 Java/Portable.pm                                   |  8 +++--
 Java/Protocol.pm                                   |  2 +-
 Java/Server.pm                                     |  2 +-
 .../org/perl/inline/java/InlineJavaServer.java     |  1 +
 MANIFEST                                           |  1 +
 META.yml                                           |  2 +-
 Makefile.PL                                        | 20 +++++++++----
 README                                             | 29 ++++++------------
 README.JNI                                         | 34 +++++++++++++++++++---
 TODO                                               |  1 +
 29 files changed, 148 insertions(+), 76 deletions(-)

diff --git a/CHANGES b/CHANGES
index 5243ab0..11dd111 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,12 @@
 Revision history for Perl extension Inline::Java
 ------------------------------------------------
-0.51
+0.52  Sun Dec 17 20:46:51 EST 2006
+    - Fixed JNI on cygwin (many thanks to Eric Rybski for the patch)
+    - Improved installation. 'make java' is now performed automatically.
+    - Fixed problems with disappearing exceptions by localizing $@.
+    - Other minor bug fixes
+
+0.51  Tue May 23 20:40:07 EDT 2006
     - Several major speed optimizations.
     - Introduction of support for I/O mapping between Perl and Java (Inline::Java::Handle)
     - Applied patches by Andrew Bruno and Tim Bunce for MAC OSX
diff --git a/Java.pm b/Java.pm
index c6ea2c9..25ee2ff 100644
--- a/Java.pm
+++ b/Java.pm
@@ -8,7 +8,7 @@ package Inline::Java ;
 use strict ;
 require 5.006 ;
 
-$Inline::Java::VERSION = '0.51' ;
+$Inline::Java::VERSION = '0.52' ;
 
 
 # DEBUG is set via the DEBUG config
@@ -1021,6 +1021,11 @@ sub set_DONE {
 }
 
 
+sub __get_INLINES {
+	return \@INLINES ;
+}
+
+
 sub java2perl {
 	my $pkg = shift ;
 	my $jclass = shift ;
diff --git a/Java.pod b/Java.pod
index 76bd267..ff75bec 100644
--- a/Java.pod
+++ b/Java.pod
@@ -138,7 +138,7 @@ make use of the same JVM.
 Specifies the starting port number for the server. If many
 C<Inline::Java> blocks are declared, the port number is
 incremented each time. Default is 0 (next available port number),
-default for SHARED_JVM mode is 7890.
+default for SHARED_JVM mode is 7891.
 
    Ex: PORT => 4567
 
@@ -185,7 +185,7 @@ make use of the same JVM.
 =item CLASSPATH
 
 Adds the specified CLASSPATH. This CLASSPATH will only be available
-threw the user classloader. To set the CLASSPATH globally (which is
+through the user classloader. To set the CLASSPATH globally (which is
 most probably what you want to do anyways), use the CLASSPATH 
 environment variable.
 
@@ -1094,6 +1094,18 @@ In addition, you may also wish to set the START_JVM option to 0 in your scripts
 to prevent them from trying to start their own JVM if they can't find one,
 thereby causing problems.
 
+=item 4
+
+Because of problems with modules C<Inline::Java> depends on, the usage of paths
+containing spaces is not fully supported on all platforms. This applies to the
+installation directory as well as the path for J2SDK and CLASSPATH elements.
+
+=item 5
+
+Even though it in run through a profiler regularly, C<Inline::Java> is relatively 
+slow compared to native Perl or Java.
+
+
 =back
 
 
diff --git a/Java/Array.pm b/Java/Array.pm
index 9f8a06f..bef74f0 100644
--- a/Java/Array.pm
+++ b/Java/Array.pm
@@ -4,7 +4,7 @@ package Inline::Java::Array ;
 use strict ;
 use Carp ;
 
-$Inline::Java::Array::VERSION = '0.51' ;
+$Inline::Java::Array::VERSION = '0.52' ;
 
 # Here we store as keys the knots and as values our blessed objects
 my $OBJECTS = {} ;
diff --git a/Java/Callback.pm b/Java/Callback.pm
index 2efcd4a..bba56ee 100644
--- a/Java/Callback.pm
+++ b/Java/Callback.pm
@@ -3,7 +3,7 @@ package Inline::Java::Callback ;
 use strict ;
 use Carp ;
 
-$Inline::Java::Callback::VERSION = '0.51' ;
+$Inline::Java::Callback::VERSION = '0.52' ;
 
 $Inline::Java::Callback::OBJECT_HOOK = undef ;
 
diff --git a/Java/Class.pm b/Java/Class.pm
index a4b9394..3758386 100644
--- a/Java/Class.pm
+++ b/Java/Class.pm
@@ -3,7 +3,7 @@ package Inline::Java::Class ;
 use strict ;
 use Carp ;
 
-$Inline::Java::Class::VERSION = '0.51' ;
+$Inline::Java::Class::VERSION = '0.52' ;
 
 $Inline::Java::Class::MAX_SCORE = 10 ;
 
diff --git a/Java/Handle.pm b/Java/Handle.pm
index db34e52..d336073 100644
--- a/Java/Handle.pm
+++ b/Java/Handle.pm
@@ -5,7 +5,7 @@ use strict ;
 use Symbol ;
 use Carp ;
 
-$Inline::Java::Handle::VERSION = '0.51' ;
+$Inline::Java::Handle::VERSION = '0.52' ;
 
 
 # Here we store as keys the knots and as values our blessed objects
@@ -115,12 +115,15 @@ sub __close {
 
 	my $obj = $this->__get_object() ;
 
-	my $ret = undef  ;
-	eval {
-		$ret = $obj->__get_private()->{proto}->CloseJavaHandle() ;
-		$obj->__get_private()->{closed} = 1 ;
-	} ;
-	croak $@ if $@ ;
+	my $ret = undef ;
+	{
+		local $@ ;
+		eval {
+			$ret = $obj->__get_private()->{proto}->CloseJavaHandle() ;
+			$obj->__get_private()->{closed} = 1 ;
+		} ;
+		croak $@ if $@ ;
+	}
 
 	return $ret ;
 }
diff --git a/Java/JNI.pm b/Java/JNI.pm
index 4a30f46..4ce50d0 100644
--- a/Java/JNI.pm
+++ b/Java/JNI.pm
@@ -4,7 +4,7 @@ package Inline::Java::JNI ;
 
 use strict ;
 
-$Inline::Java::JNI::VERSION = '0.51' ;
+$Inline::Java::JNI::VERSION = '0.52' ;
 
 use DynaLoader ;
 use Carp ;
diff --git a/Java/JNI.xs b/Java/JNI.xs
index 05fd985..9d410f5 100644
--- a/Java/JNI.xs
+++ b/Java/JNI.xs
@@ -2,6 +2,9 @@
 #include "perl.h"
 #include "XSUB.h"
 
+#ifdef __CYGWIN__
+	#include "w32api/basetyps.h"
+#endif
 
 /* Include the JNI header file */
 #include "jni.h"
diff --git a/Java/JVM.pm b/Java/JVM.pm
index d73ad2f..f81910f 100644
--- a/Java/JVM.pm
+++ b/Java/JVM.pm
@@ -9,7 +9,7 @@ use IO::Socket ;
 use Text::ParseWords ;
 use Inline::Java::Portable ;
 
-$Inline::Java::JVM::VERSION = '0.51' ;
+$Inline::Java::JVM::VERSION = '0.52' ;
 
 my %SIGS = () ;
 
diff --git a/Java/Makefile.PL b/Java/Makefile.PL
index c801c02..dc180a4 100644
--- a/Java/Makefile.PL
+++ b/Java/Makefile.PL
@@ -125,6 +125,14 @@ if ($build_jni){
 
 		CleanSoDirs() ;
 
+		# Cygwin: create gcc-compatible library wrapper for jvm.dll
+		if ($^O eq 'cygwin') {
+			my $dll = File::Spec->catfile($jdk_dir, 'lib', 'libjvm.dll.a') ;
+			print "Creating '$dll' for cygwin.\n\n" ;
+			system("/usr/bin/dlltool --input-def jvm.def --kill-at --dllname jvm.dll --output-lib '$dll'") 
+				and print "Error attempting to create '$jdk_dir/lib/libjvm.dll.a'\n" ;
+		}
+
 		print "Building with:\n" ;
 		map { print "  " . File::Spec->catfile($files->{$_}->{selected}, $_) . "\n" ;} @files ;
 
diff --git a/Java/Object.pm b/Java/Object.pm
index 0494f30..7cb6468 100644
--- a/Java/Object.pm
+++ b/Java/Object.pm
@@ -5,7 +5,7 @@ use strict ;
 use Inline::Java::Protocol ;
 use Carp ;
 
-$Inline::Java::Object::VERSION = '0.51' ;
+$Inline::Java::Object::VERSION = '0.52' ;
 
 # Here we store as keys the knots and as values our blessed private objects
 my $PRIVATES = {} ;
@@ -199,7 +199,7 @@ sub __validate_prototype {
 			}
 			$msg .= "I chose the one indicated by a star (*). To force " .
 				"the use of another signature or to disable this warning, use " .
-				"the casting functionnality described in the documentation." ;
+				"the casting functionality described in the documentation." ;
 			carp $msg ;		
 		}
 	}
@@ -351,27 +351,16 @@ sub DESTROY {
 			my $class = $this->__get_private()->{class} ;
 			Inline::Java::debug(2, "destroying object in java ($class):") ;
 
-			# This one is very tricky:
-			# Here we want to be careful since this can be called
-			# at scope end, but the scope end might be triggered
-			# by another croak, so we need to record and propagate 
-			# the current $@
-			my $prev_dollar_at = $@ ;
-			eval {
-				$this->__get_private()->{proto}->DeleteJavaObject($this) ;
-			} ;
-			if ($@){
-				# We croaked here. Was there already a pending $@?
-				my $name = $this->__get_private()->{class} ;
-				my $msg = "In method DESTROY of class $name: $@" ;
-				if ($prev_dollar_at){
-					$msg = "$prev_dollar_at\n$msg" ;
+			{
+				local $@ ;
+				eval {
+					$this->__get_private()->{proto}->DeleteJavaObject($this) ;
+				} ;
+				if ($@){
+					# We croaked here. Was there already a pending $@?
+					my $name = $this->__get_private()->{class} ;
+					croak "In method DESTROY of class $name: $@" ;
 				}
-				croak $msg ;
-			}
-			else{
-				# Put back the previous $@
-				$@ = $prev_dollar_at ;
 			}
 
 			# Here we have a circular reference so we need to break it
diff --git a/Java/PerlInterpreter/Makefile.PL b/Java/PerlInterpreter/Makefile.PL
index 30ec5ef..8d867cd 100644
--- a/Java/PerlInterpreter/Makefile.PL
+++ b/Java/PerlInterpreter/Makefile.PL
@@ -21,6 +21,7 @@ WriteMakefile(
 	CCFLAGS => "$ccopts $dupenv",
 	LDDLFLAGS => "$pre $ldopts $post $Config{lddlflags}",
 	INC => join(' ', @main::I),
+	dynamic_lib => Inline::Java::Portable::portable("dynamic_lib"),
 	# CCFLAGS => '-D_REENTRANT',
 ) ;
 
diff --git a/Java/PerlInterpreter/PerlInterpreter.pm b/Java/PerlInterpreter/PerlInterpreter.pm
index a23c04f..842a09c 100644
--- a/Java/PerlInterpreter/PerlInterpreter.pm
+++ b/Java/PerlInterpreter/PerlInterpreter.pm
@@ -3,7 +3,7 @@ package Inline::Java::PerlInterpreter ;
 use strict ;
 use Inline::Java ;
 
-$Inline::Java::PerlInterpreter::VERSION = '0.51' ;
+$Inline::Java::PerlInterpreter::VERSION = '0.52' ;
 
 
 use Inline (
diff --git a/Java/PerlInterpreter/PerlInterpreter.xs b/Java/PerlInterpreter/PerlInterpreter.xs
index 3a6ac1c..bb4c844 100644
--- a/Java/PerlInterpreter/PerlInterpreter.xs
+++ b/Java/PerlInterpreter/PerlInterpreter.xs
@@ -2,6 +2,9 @@
 #include "perl.h"
 #include "XSUB.h"
 
+#ifdef __CYGWIN__
+	#include "w32api/basetyps.h"
+#endif
 
 /* Include the JNI header file */
 #include "jni.h"
diff --git a/Java/PerlInterpreter/t/02_perl_interpreter.t b/Java/PerlInterpreter/t/02_perl_interpreter.t
index 568bc13..dc04efa 100644
--- a/Java/PerlInterpreter/t/02_perl_interpreter.t
+++ b/Java/PerlInterpreter/t/02_perl_interpreter.t
@@ -2,8 +2,15 @@ use strict ;
 
 use Test ;
 use File::Spec ;
+use Config ;
 
 BEGIN {
+    if ($^O eq 'cygwin'){
+		# Stand-alone Java interpreter cannot load Cygwin DLL directly
+        plan(tests => 0) ;
+        exit ;
+	}
+
     plan(tests => 12) ;
 }
 
diff --git a/Java/PerlNatives/Makefile.PL b/Java/PerlNatives/Makefile.PL
index bd05903..b5f94dc 100644
--- a/Java/PerlNatives/Makefile.PL
+++ b/Java/PerlNatives/Makefile.PL
@@ -1,12 +1,15 @@
 use ExtUtils::MakeMaker ;
 
 use strict ;
+require "../Portable.pm" ;
+
 
 WriteMakefile(
 	NAME => 'Inline::Java::PerlNatives',
 	VERSION_FROM => 'PerlNatives.pm',
 	INC => join(' ', @main::I),
 	LIBS => [join(' ', @main::L) . " -ljvm"],
+	dynamic_lib => Inline::Java::Portable::portable("dynamic_lib"),
 	# CCFLAGS => '-D_REENTRANT',
     clean => {FILES => "_Inline_test"},
 ) ;
diff --git a/Java/PerlNatives/PerlNatives.pm b/Java/PerlNatives/PerlNatives.pm
index e8f363e..dd587ff 100644
--- a/Java/PerlNatives/PerlNatives.pm
+++ b/Java/PerlNatives/PerlNatives.pm
@@ -2,6 +2,6 @@ package Inline::Java::PerlNatives ;
 
 use strict ;
 
-$Inline::Java::PerlNatives::VERSION = '0.51' ;
+$Inline::Java::PerlNatives::VERSION = '0.52' ;
 
 1 ;
diff --git a/Java/PerlNatives/PerlNatives.xs b/Java/PerlNatives/PerlNatives.xs
index 4610919..37663bc 100644
--- a/Java/PerlNatives/PerlNatives.xs
+++ b/Java/PerlNatives/PerlNatives.xs
@@ -3,7 +3,9 @@
 #include "stdio.h"
 #include "stdarg.h"
 
-
+#ifdef __CYGWIN__
+	#include "w32api/basetyps.h"
+#endif
 
 /* Include the JNI header file */
 #include "jni.h"
diff --git a/Java/Portable.pm b/Java/Portable.pm
index a8dc763..3b70079 100644
--- a/Java/Portable.pm
+++ b/Java/Portable.pm
@@ -9,7 +9,7 @@ use Config ;
 use File::Find ;
 use File::Spec ;
 
-$Inline::Java::Portable::VERSION = '0.51' ;
+$Inline::Java::Portable::VERSION = '0.52' ;
 
 # Here is some code to figure out if we are running on command.com
 # shell under Windows.
@@ -162,6 +162,7 @@ my $map = {
 		J2SDK_BIN			=>  'bin',
 		DEFAULT_J2SDK_DIR	=>  undef,
 		OTHERLDFLAGS		=>  '',
+		dynamic_lib			=>  {}
 	},
 	MSWin32 => {
 		ENV_VAR_PATH_SEP_CP	=>	';',
@@ -197,7 +198,8 @@ my $map = {
 		},
 		JVM_LIB				=>	'jvm.lib',
 		JVM_SO				=>	'jvm.dll',
-		BUILD_JNI_BY_DFLT	=>  0,
+		BUILD_JNI_BY_DFLT	=>  1,
+		dynamic_lib			=>  { OTHERLDFLAGS => '-Wl,-add-stdcall-alias' },
 	},
 	hpux => {
 		GOT_NEXT_FREE_PORT  =>  0,
@@ -223,7 +225,7 @@ my $map = {
            J2SDK_BIN        	=>  'Commands',
 		DEFAULT_J2SDK_DIR   =>  '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK',
 		# Tim Bunce:
-		OTHERLDFLAGS		=>  '',
+		OTHERLDFLAGS		=>  '-framework JavaVM',
 	},
 } ;
 
diff --git a/Java/Protocol.pm b/Java/Protocol.pm
index c657f05..b01f277 100644
--- a/Java/Protocol.pm
+++ b/Java/Protocol.pm
@@ -10,7 +10,7 @@ BEGIN {
 }
 
 
-$Inline::Java::Protocol::VERSION = '0.51' ;
+$Inline::Java::Protocol::VERSION = '0.52' ;
 
 my %CLASSPATH_ENTRIES = () ;
 
diff --git a/Java/Server.pm b/Java/Server.pm
index 37b80a0..b3358a6 100644
--- a/Java/Server.pm
+++ b/Java/Server.pm
@@ -13,7 +13,7 @@ require Inline::Java ;
 use File::Spec ;
 
 
-$Inline::Java::Server::VERSION = '0.51' ;
+$Inline::Java::Server::VERSION = '0.52' ;
 
 
 # Create a dummy Inline::Java object in order to 
diff --git a/Java/sources/org/perl/inline/java/InlineJavaServer.java b/Java/sources/org/perl/inline/java/InlineJavaServer.java
index e18fcbc..1c62ef9 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaServer.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaServer.java
@@ -38,6 +38,7 @@ public class InlineJavaServer {
 
 	// This constructor is used in server mode
 	// Normally one would then call RunMainLoop()
+	/* Note: Consider http://groups.google.com/group/perl.inline/tree/browse_frm/thread/aa7f5ce236f6d576/3db48a308a8175fb?rnum=1&hl=en&q=Congratulations+with+Inline%3A%3AJava+0.51&_done=%2Fgroup%2Fperl.inline%2Fbrowse_frm%2Fthread%2Faa7f5ce236f6d576%2Fd2de9cf38429c09c%3Flnk%3Dst%26q%3DCongratulations+with+Inline%3A%3AJava+0.51%26rnum%3D1%26hl%3Den%26#doc_3db48a308a8175fb before changing this prototype */
 	public InlineJavaServer(int debug, String _host, int _port, boolean _shared_jvm, boolean _priv, boolean _native_doubles){
 		init(debug, _native_doubles) ;
 
diff --git a/MANIFEST b/MANIFEST
index d5f4598..e8a797f 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -21,6 +21,7 @@ Java/Server.pm
 Java/JNI.pm
 Java/JNI.xs
 Java/typemap
+Java/jvm.def
 Java/sources/org/perl/inline/java/InlineJavaArray.java
 Java/sources/org/perl/inline/java/InlineJavaCastException.java
 Java/sources/org/perl/inline/java/InlineJavaClass.java
diff --git a/META.yml b/META.yml
index 939ccc7..41b9aaf 100644
--- a/META.yml
+++ b/META.yml
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Inline-Java
-version:      0.50_93
+version:      0.52
 version_from: Java.pm
 installdirs:  site
 requires:
diff --git a/Makefile.PL b/Makefile.PL
index 5a7a304..6facefd 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -76,7 +76,7 @@ $perl_jdk_dir =~ s/'/\'/g ;
 my $jdk_bin = Inline::Java::Portable::portable("J2SDK_BIN") ;
 my $ext = Inline::Java::Portable::portable('EXE_EXTENSION') ;
 foreach my $f ('javac', 'jar', 'java'){
-	if (! -x File::Spec->catfile($jdk_dir, $jdk_bin, $f . $ext)){
+	if (! -f File::Spec->catfile($jdk_dir, $jdk_bin, $f . $ext)){
 		my $bf = File::Spec->catfile($jdk_bin, $f . $ext) ;
 		print "Can't locate file '$bf' anywhere under '$jdk_dir'\n" ;
 	}
@@ -134,7 +134,7 @@ sub MY::top_targets {
 
 	my $make = <<MAKE ;
 # Added by Inline::Java installation
-# pure_all :: java
+pure_all :: java
 MAKE
 
 	return $make . $this->MM::top_targets() ;
@@ -146,13 +146,20 @@ my $INST_ARCHLIB = '' ;
 sub MY::postamble {
 	my $this = shift ;
 
+	my $java_src = join(' ', glob($src), File::Spec->catfile($obj_dir, 'InlineJava.properties')) ;
+
 	my $make = <<MAKE ;
 # Added by Inline::Java installation
-java ::
+JAVA_SRC=$java_src 
+
+java.ts: \$(JAVA_SRC)
 	\@\$(MKPATH) $obj_dir
 	"$javac" -deprecation -g -d $obj_dir $src
 	"$jar" cf $server_arch -C $obj_dir org -C $obj_dir InlineJava.properties
 	"$jar" cf $user_arch -C $obj_dir InlineJavaUserClassLink.class
+	\@\$(TOUCH) java.ts
+
+java :: java.ts
 MAKE
 
 	# Used for PerlNatives
@@ -193,7 +200,7 @@ WriteMakefile(
 		$server_arch => File::Spec->catfile('$(INST_LIBDIR)', $server_arch),
 		$user_arch => File::Spec->catfile('$(INST_LIBDIR)', $user_arch),
 	},
-	clean => {FILES => "$def_jdk _Inline_test $natives_test $perlinterp_test $obj_dir $server_arch $user_arch"},
+	clean => {FILES => "$def_jdk _Inline_test $natives_test $perlinterp_test $obj_dir $server_arch $user_arch java.ts"},
 ) ;
 
 
@@ -223,15 +230,19 @@ close(J2SDK) ;
 my @perlnatives_so_parts = ("auto", "Inline", "Java", "PerlNatives", 
 	"PerlNatives." . Inline::Java::Portable::portable('SO_EXT')) ;
 my $install_perlnatives_so = File::Spec->catfile($INSTALLSITEARCH, @perlnatives_so_parts) ;
+$install_perlnatives_so = Inline::Java::Portable::portable("SUB_FIX_JAVA_PATH", $install_perlnatives_so) ;
 $install_perlnatives_so =~ s/\\/\\\\/g ;
 my $test_perlnatives_so = File::Spec->rel2abs(File::Spec->catfile($INST_ARCHLIB, @perlnatives_so_parts)) ;
+$test_perlnatives_so = Inline::Java::Portable::portable("SUB_FIX_JAVA_PATH", $test_perlnatives_so) ;
 $test_perlnatives_so =~ s/\\/\\\\/g ;
 
 my @perlinterpreter_so_parts = ("auto", "Inline", "Java", "PerlInterpreter",
     "PerlInterpreter." . Inline::Java::Portable::portable('SO_EXT')) ;
 my $install_perlinterpreter_so = File::Spec->catfile($INSTALLSITEARCH, @perlinterpreter_so_parts) ;
+$install_perlinterpreter_so = Inline::Java::Portable::portable("SUB_FIX_JAVA_PATH", $install_perlinterpreter_so) ;
 $install_perlinterpreter_so =~ s/\\/\\\\/g ;
 my $test_perlinterpreter_so = File::Spec->rel2abs(File::Spec->catfile($INST_ARCHLIB, @perlinterpreter_so_parts)) ;
+$test_perlinterpreter_so = Inline::Java::Portable::portable("SUB_FIX_JAVA_PATH", $test_perlinterpreter_so) ;
 $test_perlinterpreter_so =~ s/\\/\\\\/g ;
 
 my $libperl = $Config{libperl} ;
@@ -271,7 +282,6 @@ if (Inline::Java::Portable::portable('COMMAND_COM')){
 
 my $make = Inline::Java::Portable::portable('MAKE') ;
 print "\nYou can continue the installation with the following commands:\n" ;
-print "  % $make java\n" ;
 print "  % $make\n" ;
 print "  % $make test\n" ;
 print "  % $make install\n" ; 
diff --git a/README b/README
index d87d210..a2b7320 100644
--- a/README
+++ b/README
@@ -42,15 +42,16 @@ INSTALLATION:
 To install Inline::Java do this:
 
   % perl Makefile.PL J2SDK=/your/java/dir   (see Note 1)
-  % make java                               (see Note 2)
-  % make
+  % make                                    (see Note 2)
   % make test                               (see Note 3, 4)
   % make install
 
 You have to 'make install' before you can run it successfully. 
 
 Note 1: Under Win95/98/Me, you may need to do 'cd ..' to get back to the
-your original directory after the command has completed.
+your original directory after the command has completed. Also, you may set
+either the JAVA_HOME or the PERL_INLINE_JAVA_J2SDK environment variable to 
+/your/java/dir instead of using the J2SDK Makefile.PL parameter.
 
 Note 2: Use nmake on Win32.
 
@@ -66,23 +67,11 @@ second time you test loading of an already built module.
 -------------------------------------------------------------------------------
 FEATURES FOR THIS VERSION:
 
-Inline::Java version 0.51 is a major upgrade that includes:
-    - Several major speed optimizations.
-    - Introduction of support for I/O mapping between Perl and Java (Inline::Java::Handle)
-    - Applied patches by Andrew Bruno and Tim Bunce for MAC OSX
-    - JNI fix for system property passing
-        (thanks to Brian Gugliemetti and Jason Stelzer)
-    - Added NATIVE_DOUBLES configuration option to avoid loss of precision
-      when passing double values between Perl and Java
-    - New interface for processing callbacks from java to perl.
-    - Added support for java.lang.CharSequence as a primitive type. Any
-      Perl scalar passed as a java.lang.CharSequence will instantiate
-      a java.lang.String on the Java side
-    - Added BUILD_JNI, BUILD_PERL_NATIVES, BUILD_PERL_INTERPRETER and JVM_LIB_TYPE build
-      configuration options to help with automated builds
-    - Added BIND configuration option. See docs for details.
-      Note: The Java JVM server noe listens on localhost by default (instead of 0.0.0.0).
-    - Other minor bug fixes
+Inline::Java version 0.52 is a minor upgrade that includes:
+    - Fixed JNI on cygwin (many thanks to Eric Rybski for the patch)
+    - Improved installation. 'make java' is now performed automatically.
+    - Fixed problems with disappearing exceptions by localizing $@.
+    - Other minor bug fixes.
 
 See CHANGES for a full change list.
 
diff --git a/README.JNI b/README.JNI
index e0c131f..7bc6ad1 100644
--- a/README.JNI
+++ b/README.JNI
@@ -35,13 +35,14 @@ OVERVIEW
 +-------------+----------+------------+------------+
 | Win32       |    ok    |     ok     |     ok     |
 +-------------+----------+------------+------------+
+| cygwin      |    ok*   |     ok*    |     ok*    |
++-------------+----------+------------+------------+
 | Linux RH7.3 |    ok*   |     ok*    |     ?      |
 +-------------+----------+------------+------------+
 | Linux RH9.0 |    ok*   |     ok*    |     ok     |
 +-------------+----------+------------+------------+
 | Soloris 2.8 |    ok*   |      ?     |     ?      |
 +-------------+----------+------------+------------+
-Note: J2SDK1.5.0 is still beta.
 *   : Read below
 
 
@@ -101,9 +102,34 @@ that you use Perl >= 5.8.0 or do one of the following:
 
 CYGWIN
 ------
-I have never been able to get the JNI extension running under Cygwin (it
-won't compile). My guess is that I should be using a Linux J2SDK and not 
-a Windows one. I anybody has anything on this please let me know.
+Java 2 SDK 1.3.1:
+   The JNI extension runs without problems.
+
+    PerlInterpreter:
+        Compiles but stand-alone (non-JNI initiated) Java interpreter locks
+        up when attempting to load the DLL.  This is a known issue with
+        initialization of the cygwin1.dll from a non-cygwin DLL or EXE, which
+        has been "broken" since at least Cygwin 1.5.13.
+        A possible work around might be to build the PerlInterpreter against
+        a native Win32 Perl distribution with '-mno-cygwin' GCC compile flag,
+        although this means you would be using native Perl instead of Cygwin
+        Perl when using PerlInterpreter.
+
+Java 2 SDK 1.4.2:
+   The JNI extension runs without problems.
+
+   PerlInterpreter:
+       The same as Java 2 SDK 1.3.1 applies.
+
+   PerlNatives:
+       Compiles and runs fine in a JNI-initiated interpreter, but stand-alone
+       (non-JNI initiated) Java interpreter locks up when attempting to load
+       the DLL.  This is a known issue with initialization of the
+       cygwin1.dll from a non-cygwin DLL or EXE, which has been "broken"
+       since at least Cygwin 1.5.13.
+
+Java 2 SDK 1.5.0:
+   The same as Java 2 SDK 1.4.2 applies.
 
 
 BUILDING PERL
diff --git a/TODO b/TODO
index 5ac2656..997685c 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,5 @@
 CODE:
+- Localize $@ where required
 - Finish PerlInterpreter test suite
 - Finish PerlHandle stuff and document
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git



More information about the Pkg-perl-cvs-commits mailing list