php-java bridge

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cucucur
Forum Newbie
Posts: 7
Joined: Tue Apr 05, 2011 2:01 am

php-java bridge

Post by cucucur »

I can't understand how it works!!!

It started working, I create a new Java class and it worked, but when I change something in my Java class I compilate it, but php doesn't take the new value. Those are my codes:

Java class located in /var/www/testjava:

[text]
public class HelloWorld {
public String sayHello(){
return "Hello World";
}
}
[/text]

Code: Select all

<?php require_once("../JavaBridge/java/Java.inc");?>
<?php
	java_require('/var/www/testjava');
	$helloWorld = new Java('HelloWorld');
	echo $helloWorld->sayHello()
?>
It works, but, when I change [text]return "Hello World"[/text], for example [text] return "hi world this is a change"[/text] it continues showing "Hello World"

How can it happen?

Thank you so much!!!
Post Reply