Adding JARs to Zend JAVA Bridge CLASSPATH

Follow

Applies to:

Zend Server Editions with JAVA Bridge feature

Summary

When utilizing JAVA runtime classes under PHP, for legacy software written in JAVA or for ad-hoc operations without a web service architecture between PHP and JAVA, you will probably need to use your own JAVA Classes.

Technical

1. To add your individual JARs to the Zend JAVA Bridge runtime JVM, backup, then edit the CLASSPATH line on the following ini files:

Linux / Mac

/usr/local/zend/etc/watchdog-jb.ini

Windows

X:\PATH\TO\Zend\ZendServer\etc\java_bridge_server.ini

2. Once your JB CLASSPATH is modified with additional JARs, restart JAVA Bridge and check that it was started OK.

Linux / Mac

zendctl.sh restart-jb

Windows CMD

net stop ZendJavaBridge

net start ZendJavaBridge

Windows GUI

Start -> Run 'services.msc', locate the Zend JAVA Bridge service and restart

Conclusion

After adding the application JARs and restarting JAVA Bridge service, you will be able to call your JAVA classes and methods from PHP scripts.

References

JAVA Bridge on Zend Server Online Manual

Have more questions? Submit a request

Comments

Powered by Zendesk