Hello, I know this is not the proper place where to submit this fix but I failed to find an alternative since the extension is no longer maintained and people continue to encounter this problem. If any of you know who is responsible, please forward him this message.
Thank you! [*] Summary: The Java extension provides a simple and effective means for creating and invoking methods on Java objects from PHP. The JVM is created using JNI, and everything runs in-process. [*] Bug details: The extension is unable to load the library from the included php_java.jar because the net\php\reflect.properties file contains an extra space at the end of the line. This is a Windows only issue caused by misuse of the '>' file redirection operator when creating the .jar file. <snip> Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. \Alex>echo bug > t1.txt \Alex>echo bug> t2.txt \Alex>fc /b t1.txt t2.txt Comparing files t1.txt and T2.TXT 00000003: 20 0D 00000004: 0D 0A FC: t1.txt longer than T2.TXT </snip> This problem has been reported before, but no action has been taken: http://bugs.php.net/bug.php?id=33718 http://pecl.php.net/bugs/bug.php?id=7679 ... [*] Affected PHP versions: <=5.2.0 [*] Patch details: Removes the extra space when creating the .jar file. -- Alexandru.Burciu www.Info.UAIC.ro
Index: config.w32 =================================================================== RCS file: /repository/pecl/rpc/java/config.w32,v retrieving revision 1.2 diff -u -r1.2 config.w32 --- config.w32 26 Feb 2005 01:12:35 -0000 1.2 +++ config.w32 17 Nov 2006 13:34:49 -0000 @@ -49,7 +49,7 @@ MFO.WriteLine("\tif not exist $(BUILD_DIR)\\net mkdir $(BUILD_DIR)\\net"); MFO.WriteLine("\tif not exist $(BUILD_DIR)\\net\\php mkdir $(BUILD_DIR)\\net\\php"); MFO.WriteLine("\tcopy " + configure_module_dirname + "\\reflect.java $(BUILD_DIR)\\net\\php > NUL"); - MFO.WriteLine("\techo library=php_java > $(BUILD_DIR)\\net\\php\\reflect.properties"); + MFO.WriteLine("\techo library=php_java> $(BUILD_DIR)\\net\\php\\reflect.properties"); MFO.WriteLine("\tcd $(BUILD_DIR)"); MFO.WriteLine("\t\"" + PHP_JAVA + "\\bin\\javac\" " + ext_javac_flags + " net\\php\\reflect.java"); MFO.WriteLine("\t\"" + PHP_JAVA + "\\bin\\jar\" c0f php_java.jar net\\php\\*.class net\\php\\*.properties"); Index: Makefile.frag =================================================================== RCS file: /repository/pecl/rpc/java/Makefile.frag,v retrieving revision 1.4 diff -u -r1.4 Makefile.frag --- Makefile.frag 15 Aug 2002 14:18:07 -0000 1.4 +++ Makefile.frag 17 Nov 2006 13:34:49 -0000 @@ -4,7 +4,7 @@ $(srcdir)/php_java.jar : $(srcdir)/reflect.java @$(mkinstalldirs) $(srcdir)/net/php @cp $(srcdir)/reflect.java $(srcdir)/net/php - @echo library=php_java > $(srcdir)/net/php/reflect.properties + @echo library=php_java> $(srcdir)/net/php/reflect.properties @$(JAVA_C) $(srcdir)/net/php/reflect.java @test ! -f reflect.class || mv reflect.class $(srcdir)/net/php # bug in KJC javac @$(JAVA_JAR) $(srcdir)/php_java.jar -C $(srcdir) net/php/reflect.class -C $(srcdir) net/php/reflect.properties
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php