views:

141

answers:

5

hi

i wonder if there is a php equivalent to jython so you can use java classes with php?

thanks

+6  A: 

http://www.caucho.com/resin-3.0/quercus/

http://php-java-bridge.sourceforge.net/pjb/

Amber
but is quercus equivalent to jython? does jython compile python to java?
never_had_a_name
+1  A: 

I just googled php jvm and got a bunch of hits. Never tried any of them.

Don Kirkby
+1  A: 

Well: Java Server Pages (JSP) are "equivalent" to PHP, but using java classes. It's "equivalent" in that it's HTML with embedded java code, but not at all compatible to PHP syntax.

Steven D. Majewski
+1  A: 

Fayer,

Try PHP/Java Bridge that integrates PHP and Java, as recommended in PHP manual (Java Class - dead- URL: www.php.net/manual/en/java.installation.php).

Please, let me know how it worked for you. You may have to use Zend Server CE (www.zend.com/en/products/server-ce/), instead of Apache.

Best.

Matias Perrone
i will use this in some months from now. if i remember this post i will let u know how it went:)
never_had_a_name
+2  A: 

I'm not quite sure what you are asking, since you are talking about two completely different things: a PHP equivalent to Jython, and accessing Java classes from PHP. So, I'm going to answer both.

Jython is a Python implementation for the JVM. So, the PHP equivalent would be a PHP implementation for the JVM. There are actually two that I know of: IBM's P8, which is part of Project Zero and Quercus.

However, you don't need to run your PHP on Java if you want to run it with Java. A PHP-to-Java bridge would be enough, you don't need a PHP-on-Java implementation. I know that at some point in the past at least one such bridge must have existed, because someone once told me that they used one, but that is about all I know.

Jörg W Mittag