|
From: <php...@li...> - 2012-07-18 08:23:32
|
AC,
your java server (tomcat, etc.) is a permanent process, where as your php
scripts
are evaluated on every request. If you want to see changes to your java
code, you'll have
to restart (redeploy) the service that holds your java classes (tomcat,
pjb-standalone) because
these processes hold the bytecode contained in your .class files in memory
and thus won't notice/care
that the file went away.
On Wed, Jul 18, 2012 at 10:11 AM, <
php...@li...> wrote:
> [PHP code]
> $java = new java_class("my.project.Experiment");
> $myResult = $java->run();
> echo $myResult;
>
> [JAVA code]
> package my.project;
>
> public class Experiment {
> public static String run(String x){
> return "results: " +x;
> }
> }
>
> Until here everything works fine.
>
> Then I create another class, Experiment2, exactly as the first one but the
> method is now called run2.
>
> I delete the Experiment class (NB: if I run "find -name Experiment.class"
> nothing is found).
>
> I then change the PHP code to use Experiment2, and I get an "error 500".
> This is already a problem since the class is there and is very basic.
> But then, if I change the PHP code and try to use the Experiment class, it
> works again!
>
> That sounds as impossible to me because Experiment2.class is for some
> reason not found, and also because Experiment.class is nowhere to be found
> in the system.
>
> The only solution I could find is that PHP is storing the information on
> the java classes somewhere, but I couldn't find where.
> I also tried to delete Firefox's history, but the results are the same.
>
> Any help would be highly appreciated.
> Thanks in advance,
> AC
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
--
Dominik Dorn
http://dominikdorn.com
http://twitter.com/domdorn
Skripten, Mitschriften, Lernunterlagen, etc. findest Du auf
http://www.studyguru.eu !
|