From: <php...@li...> - 2007-03-14 10:55:16
|
Hi Daniel, > Suse Linux 10.1 is installed. afaik there is no binary RPM available for Novell/Suse Linux, so you need to compile from source or use the J2EE binary instead. > I downloaded the package from SF, installed it via > Package Manager and moved the files into the > extension directory. I don't know which RPM you've installed, but the RedHat RPM will only work on RedHat based Linux distributions (Fedora, Centos, ...). There are other RPM packages available for Mandrake etc. In practice you need to move the java.so to the php extension directory and set the java.hosts and java.servlet (to connect to an external J2EE server) or java.java and java.home (to start an internal Java process). > The php.ini contains the following values for Java: > [Java] > extension=java.so This uses the default settings: it starts the compiled, native back end which doesn't need any java installed on the system. -- RedHat ships with gcj ("GNU Java") as the default "Java" implementation. > What is the file "RunJavaBridge" for? It is a Security Enhanced Linux wrapper which manages the domain transition from http_t to javabridge_t. It is irrelevant for you because Novell/Suse Linux doesn't support Security Enhanced Linux. -- At the moment only RedHat based distributions (and some experimental Debian distributions) support Security Enhanced Linux. Please see the SEL web page from the NSA or RedHat for details. > an executable, but how can I use it? Try start RunJavaBridge, it should display a discription. > Any help to get the Bridge running on my system is > appreciated. Well, since your distribution doesn't support any Linux specific enhancements anyway (no SEL, GNU Java, ...), you can ignore the Linux package and use the standard J2EE package instead. Start a Java process (for example from a service script) as follows: java -jar JavaBridge.jar SERVLET_LOCAL:8080 To access Java from any PHP script use the following code: <? require_once("http://localhost:8080/JavaBridge/java/Java.inc"); $s = new Java("java.lang.String", "hello"); echo $s; ?> Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |