Re: RE: Java-Mess
| From: | Jay Greenspan | Date: | Thu, 26 Oct 2000 02:11:18 +0000 |
| Subject: | Re: RE: Java-Mess | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22008@lists.php.net to get a copy of this message | ||
Couple of suggestions:
First make sure you've added the proper directory to your
path.
When you type "which java" at the shell it should return a
meaningful answer.
My life got a lot easier when I got Java working with a CGI
implementation of PHP, not as an Apache module. I was
able to play with the php.ini and test it after each change.
With a module, you have to start and stop the server each
time.
The final thing is, don't sneeze. I did in the vicinity of my Linux
box and had to recompile to get Java to working again.
HTH
j
>I tried to call a Java-class from php. I tried to make small steps, so
>the first thing I did was:
><?
>$j = new Java("java.lang.System"); // This is line 2
>?>
>
>With the result:
>Fatal error: Cannot instantiate non-existent class: java in
>/var/www/html/java.php on line 2
>
>So what went wrong ? I have configured php '--with-java'. But in
>phpinfo(), there is no other hint on java then this. Help !
>
>Martin