Re: PHP with JAVA support

From: Date: Thu, 21 Jun 2001 18:16:07 +0000
Subject: Re: PHP with JAVA support
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-54781@lists.php.net to get a copy of this message
Robert, If I run your code on my installation, all I get is the phpInfo() output. If I comment out that line, it returns: Java version=1.4.0-beta Java vendor=Sun Microsystems Inc. OS=Linux 2.2.14-5.0 on i386 Thursday, June 21, 2001 at 9:59:05 AM GMT-08:00 ...as I would expect. It would appear that the error refers to PHP not being able to instantiate the PHP Java class. I'd check the following: Your php.ini line: java.extension=/usr/local/lib/php/extensions/libphp_java.so Be sure that the file actually exists there. On my system, it's installed in /usr/local/lib/php/extensions/no-debug-non-zts-20001222, and the lines in php.ini that load it are different from yours: extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20001222 extension = libphp_java.so -Jim "Robert Vetter" <robert.vetter@ppo.de> wrote in message news:3B31B94E.6D98DA1F@ppo.de... > > > Jim Kirkpatrick wrote: > > > > Robert, > > > > Please include the php code you're using to instantiate the class. That will > > give me a better idea of what to suggest. > > > > Hi Jim, > > Thanks for the response. Here comes the code: > > <? > phpinfo(); > $system = new Java("java.lang.System"); > print "Java version=".$system->getProperty("java.version")." > <br>\n"; > print "Java vendor=".$system->getProperty("java.vendor")." > <p>\n\n"; > print "OS=".$system->getProperty("os.name")." ". > $system->getProperty("os.version")." on ". > $system->getProperty("os.arch")." <br>\n"; > > $formatter = new Java("java.text.SimpleDateFormat","EEEE, > MMMM dd, yyyy 'at' h:mm:ss a zzzz"); > print $formatter->format(new Java("java.util.Date"))."\n"; > > ?> > > > Robert > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#54781) next »