Menu

Tree [r183] / trunk / php-java-bridge /
 History

HTTPS access


File Date Author Commit
 examples 2005-03-05 jost2345 [r161] Release 2.0
 server 2005-04-11 jost2345 [r179] print bridge instance
 tests.m4 2005-02-03 jost2345 [r137] add realtime lib for solaris x86
 tests.mono+net 2005-03-27 jost2345 [r173] *** empty log message ***
 tests.php4 2005-04-13 jost2345 [r183] PR1176523
 tests.php5 2005-04-13 jost2345 [r183] PR1176523
 unsupported 2005-01-28 jost2345 [r123] Release-1.0.8
 ChangeLog 2005-04-07 jost2345 [r174] version
 INSTALL 2005-02-21 jost2345 [r159] do not change the channel if server was forked ...
 INSTALL.WINDOWS 2005-04-13 jost2345 [r182] docu
 LICENSE 2004-10-18 jost2345 [r54] correct author
 Makefile.frag 2005-02-03 jost2345 [r135] Release-1.0.8
 PROTOCOL.TXT 2005-04-08 jost2345 [r176] PR1174918: wrong charset
 README 2005-04-13 jost2345 [r182] docu
 README.GNU_JAVA 2005-02-20 jost2345 [r156] Release-2.0-beta
 VERSION 2005-04-07 jost2345 [r174] version
 bind.c 2005-03-27 jost2345 [r172] mono
 client.c 2005-04-11 jost2345 [r180] PR1176522
 config.m4 2005-03-27 jost2345 [r172] mono
 init_cfg.c.in 2005-03-27 jost2345 [r172] mono
 java.c 2005-04-11 jost2345 [r180] PR1176522
 java_bridge.c 2005-03-27 jost2345 [r172] mono
 java_bridge.h 2005-03-07 jost2345 [r162] Release-2.0.1
 multicast.c 2005-04-07 jost2345 [r175] PR1176534: PHP/Java Bridge 2.0.5 does not compi...
 multicast.h 2005-03-27 jost2345 [r172] mono
 parser.c 2005-03-27 jost2345 [r172] mono
 parser.h 2005-02-15 jost2345 [r147] Replaced JNI with XML protocol
 php-java-bridge 2005-04-12 jost2345 [r181] PR1177991: FC3 service status command not working
 php-java-bridge.fc.in 2005-02-03 jost2345 [r135] Release-1.0.8
 php-java-bridge.service 2005-04-12 jost2345 [r181] PR1177991: FC3 service status command not working
 php-java-bridge.spec 2005-04-07 jost2345 [r174] version
 php-java-bridge.te 2005-03-07 jost2345 [r162] Release-2.0.1
 php_java.h 2005-04-11 jost2345 [r180] PR1176522
 php_java_snprintf.c 2005-03-27 jost2345 [r172] mono
 php_wrapper.h 2004-12-01 jost2345 [r105] release 1.0.7
 protocol.c 2005-03-13 jost2345 [r168] LOCALE fixes
 protocol.h 2005-03-11 jost2345 [r167] windows fixes
 test.php 2005-03-07 jost2345 [r162] Release-2.0.1
 update_policy.sh.in 2005-02-24 jost2345 [r160] Replaced Guile/SCHEME with Chicken/SCHEME example

Read Me

  Using GNU Java
  --------------

  In case you don't want to ship a JVM or JRE with your product,
  you can use GNU gcc to compile the java part and your classes
  into native code. 
  In the directory php-java-bridge_1.x.y type:

   gcj --version  # must be gcj 4.0 or above.

   phpize && ./configure && make &&  su -c "make install"

  This creates a native, dynamic linked executable in the PHP
  extension directory.  It can be started with the command:

      `php-config --extension-dir`/java <java.socketname> <loglevel> <log-file>

  For example:

      `php-config --extension-dir`/java /var/run/.php-java-bridge_socket 1 "" |
        tee /var/log/php-java-bridge.log

  Then direct the bridge to the server-socket by hard-coding the
  java.socketname to /var/run/.php-java-bridge_socket (as described
  in the install instructions) and re-start the apache service.

  If you now invoke the test.php file, you should see the
  output from GNU Java (e.g.):

   ./test.php | fgrep java.vendor
     java.vendor -> Free Software Foundation, Inc.
     java.vendor.url -> http://gcc.gnu.org/java/

  GNU gcc is a "ahead of time" compiler. That means that classes
  which are added after compilation must be interpreted by the
  GNU java interpreter.  There's no "just in time" compiler.
  To compile your classes with the java executable you can append 
  the classes, java or jar files at the end of the java_SOURCES
  line of the server/Makefile.am.  For example:
    
  java_SOURCES= java.c JavaBridge.java my_file.java

  Then type "make install" to re-install the binary. 

  If you want to compile the server part as a separate component;
  the server sub-directory is driven by autoconf and has been
  configured with the command:

     sh autogen.sh
     dir=../modules
     ./configure --with-java --libdir=$dir --datadir=$dir --bindir=$dir

  After you have created the executables you can distribute the 
  contents of the php-java-bridge-x.y.z/modules directory. It
  should contain the files "java", "libnatcJavaBridge.so", "java.so"
  (autoconf/libtool creates other files, you can delete them). The
  java.so is the PHP module, the other files are required to start the
  server part.  The "java" executable may need other system libraries, 
  for example "gcj.so" and "gcc_s.so". They should be installed on the 
  target system.

  Additional shared libraries can be copied into the php extension
  directory (see command "php-config --extension-dir"), additional
  java libraries (.jar files) can be installed in the sub-directory
  lib/ of the php extension directory.

  GNU Java still has some limitations.  Because the SUN java classes
  are not free software, all GNU java classes had to be written from
  scratch.  It may happen that the GNU java classes contain bugs or
  have certain limitations.  For example con.getContentLength()
  constantly returns -1; length not available.
   
  However, GNU java is already good enough to be used as a bridge
  between PHP and the "real" java application server such as BEA
  WebLogic. It can be used to implement the presentation- and,
  depending on the project, even the service layer.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.