{"id":15647509,"url":"https://github.com/belgattitude/php-java-bridge","last_synced_at":"2025-04-30T13:17:31.346Z","repository":{"id":52778372,"uuid":"46735992","full_name":"belgattitude/php-java-bridge","owner":"belgattitude","description":"Soluble PHP/Java bridge server (unofficial fork)","archived":false,"fork":false,"pushed_at":"2021-04-25T10:05:04.000Z","size":46596,"stargazers_count":48,"open_issues_count":5,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T13:17:03.678Z","etag":null,"topics":["bridge","java","php","php-java-bridge","phpjavabridge","server","soluble-japha"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/belgattitude.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-23T17:15:19.000Z","updated_at":"2025-02-17T09:39:17.000Z","dependencies_parsed_at":"2022-08-22T08:20:47.133Z","dependency_job_id":null,"html_url":"https://github.com/belgattitude/php-java-bridge","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belgattitude%2Fphp-java-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belgattitude%2Fphp-java-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belgattitude%2Fphp-java-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belgattitude%2Fphp-java-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belgattitude","download_url":"https://codeload.github.com/belgattitude/php-java-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251711871,"owners_count":21631297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bridge","java","php","php-java-bridge","phpjavabridge","server","soluble-japha"],"created_at":"2024-10-03T12:19:42.544Z","updated_at":"2025-04-30T13:17:31.282Z","avatar_url":"https://github.com/belgattitude.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Java bridge\n\n[![Build Status](https://travis-ci.org/belgattitude/php-java-bridge.svg?branch=master)](https://travis-ci.org/belgattitude/php-java-bridge)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.soluble.pjb/php-java-bridge/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.soluble.pjb/php-java-bridge)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/belgattitude/php-java-bridge/blob/master/LICENSE.md)\n(develop branch: \n[![Build Status](https://travis-ci.org/belgattitude/php-java-bridge.svg?branch=develop)](https://travis-ci.org/belgattitude/php-java-bridge))\n\nThe soluble PHPJavaBridge server fork allows PHP/JVM interoperability through a local network protocol between both runtimes.\n\n\u003e **Disclaimer: Unofficial fork !!!**\n\u003e  \n\u003e This fork was initially made on the [sourceforge](https://sourceforge.net/p/php-java-bridge/code/) version made by Jost Boekemeier\n\u003e as its development seemed to have stopped after version 6.2.1.\n\u003e   \n\u003e Be aware that since the project have been forked, the official repo looks to\n\u003e be alive again with recent versions supporting PHP7. Unfortunately most of the \n\u003e the fixes and enhancements made on this fork have not been merged in upstream version.         \n\u003e       \n\u003e Feel free to choose which version you install (fork or official). \n\u003e To keep a track of differences, you can refer to the [fork status](./doc/notes_fork_status.md) page.\n\u003e\n\u003e Note that this fork have been specifically designed for PHP -\u003e Java integration, so\n\u003e so if you intend to use it from Java -\u003e PHP, the best is to use the official version as\n\u003e it looks better tested for that scenario.     \n   \n\n## Installation\n\nThis repository can be used to develop, test and and build the JavaBridge server. \n\nBe sure to consult the [soluble-japha](http://docs.soluble.io/soluble-japha/) website \nwhere you'll find more information relative to php/java integration.  \n\n \n## Documentation\n\n- Soluble PHPJavaBridge server [API doc](http://docs.soluble.io/php-java-bridge/api).\n- PHP `soluble-japha` client [documentation](https://github.com/belgattitude/soluble-japha)  \n\n\u003e Older documentation can be found in the [PHP/Java bridge](http://php-java-bridge.sourceforge.net/pjb/) site\n\n## Releases\n\n- You can download pre-compiled [java bridge binaries](https://github.com/belgattitude/php-java-bridge/releases) on the releases page (jdk8). \n- Major releases are published on [Maven central](https://search.maven.org/#search%7Cga%7C1%7Cio.soluble.pjb.php-java-bridge).\n\n  With maven:\n    \n  ```\n  \u003cdependency\u003e\n     \u003cgroupId\u003eio.soluble.pjb\u003c/groupId\u003e\n      \u003cartifactId\u003ephp-java-bridge\u003c/artifactId\u003e\n     \u003cversion\u003ex.y.z\u003c/version\u003e\n  \u003c/dependency\u003e\n  ```\n    \n  or gradle\n    \n  ```\n  compile 'io.soluble.pjb:php-java-bridge:x.y.z'\n  ```\n\nTo register the PHPJavaServlet, you can have a look to the example [web.xml](https://github.com/belgattitude/php-java-bridge/blob/master/src/main/webapp/WEB-INF/web.xml) file.\n\n\n## Build the project\n\n### Requirements\n\n - Oracle JDK 7,8\n - Optionally `ant` for old Java.inc generation\n \n### Get the sources\n\nYou can either clone the project with:\n\n```shell\n$ git clone https://github.com/belgattitude/php-java-bridge.git\n```\n\nor download a zip tarball from the github page.\n\n### Gradle build \n\nBuild the project with the provided gradle wrapper:\n\n```shell\n$ cd php-java-bridge\n$ ./gradlew build \n```\n\nThe generated files are available in the  `/build/libs` folder:\n\n| File          | Description   | \n| ------------- | ------------- | \n| `php-java-bridge-\u003cVERSION\u003e.jar`  | JavaBridge library (servlet and standalone). | \n| `php-java-bridge-\u003cVERSION\u003e-sources.jar`  | Source code. | \n| `php-java-bridge-\u003cVERSION\u003e-javadoc.jar`  | Generated api doc. |\n\nAdditionally a generic template file is automatically generated: \n\n| File          | Description   | \n| -------------| ------------- | \n| `JavaBridgeTemplate.war`  | A ready to deploy war example file. |\n\n \n### Adding deps to the builded '.war'\n \nInstead of modifying directly the main `build.gradle` file, you should consider using \ninit-scripts. Examples can be found on the [init-scripts doc](./init-scripts/README.md). \n\n                                                                                                                 \n## Usage\n\n\u003e Currently only tested on Tomcat 7/8, should be running on any servlet 2.5 compatible container.\n\n### Servlet registration\n\nYou can have a look to the [web.xml](https://github.com/belgattitude/php-java-bridge/blob/master/src/main/webapp/WEB-INF/web.xml) default configuration\nfor the servlet configuration settings. \n\n### Deploy\n\nEnsure you have a [Tomcat server](./docs/install/install_tomcat.md) installed.\n\nAnd copy the ready to run `JavaBridgeTemplate.war` in the tomcat webapps folder:\n\n```shell\n$ sudo cp ./build/libs/JavaBridgeTemplate.war /var/lib/tomcat8/webapps/JavaBridgeTemplate.war\n```\n\nWait few seconds for deployment and point your browser to [http://localhost:8080/JavaBridgeTemplate](http://localhost:8080/JavaBridgeTemplate), you should see the\nbridge landing page :\n\n![](./doc/images/bridge_landing.png \"Landing screenshot\")\n\n\nHave a look to the error log if needed:\n\n```shell\n$ cat /var/log/tomcat8/catalina.out\n```\n\n## Develop\n\nFor development, the use of the `./gradlew tomcatRun` and `./gradlew tomcatStop` allows testing \nwithout the need of deployment.\n\nDependencies can be added in the `build.gradle` file.   \n\n## FAQ\n\n### OutOfMemory errors under Tomcat\n\nIf you get OutOfMemory errors, you can increase the java heap tomcat:\n\n```shell\n$ sudo vi /etc/default/tomcat8\n```\n\nLook for the Xmx default at 128m and increase \n\n```\nJAVA_OPTS=\"-Djava.awt.headless=true -Xmx512m -XX:+UseConcMarkSweepGC\"\n```\n\nand restart\n\n```shell\n$ sudo service tomcat8 restart\n```\n \n## Contribute\n\nFeel free to fork and submit pull requests :)\n\n## Credits\n\nOriginal developers:\n\n- Jost Boekemeier\n- Andre Felipe Machado, \n- Sam Ruby, \n- Kai Londenberg, \n- Nandika Jayawardana, \n- Sanka Samaranayake, \n\nForked version\n\n- [Christian P. Lerch](https://github.com/cplerch): Java refactorings and modernizations. \n- [Sébastien Vanvelthem](https://github.com/belgattitude): Fork initiator and maintainer.\n\nSee the [CREDITS.md](./CREDITS.md) for an up to date of list of contributors.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelgattitude%2Fphp-java-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelgattitude%2Fphp-java-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelgattitude%2Fphp-java-bridge/lists"}