I am trying to use java from mod_php4. I have the following components
defined:
critical# ./httpd -v
Server version: Apache/1.3.22 (Unix)
Server built: Nov 28 2001 06:45:27
critical# ./httpd -l
Compiled-in modules:
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_access.c
mod_auth.c
mod_so.c
mod_setenvif.c
mod_ssl.c
mod_php4.c
I have everything linked together and the PHP and Apache parts work fine.
However, when I try running one of the sample programs (jver.php), I get
the following error message:
Fatal error: java.lang.NoClassDefFoundError: net/php/reflect in
/net/trout/export/home2/martin/public_html/jver.php on
line 4
The error seems to come from /usr/local/php-4.0.6/ext/java/reflect.java
which the Makefile compiles into php_java.jar. The reflect.java program
has the following header information:
/* $Id: reflect.java,v 1.20 2001/02/26 06:07:01 andi Exp $ */
My php.ini file has the following:
java.library.path=/usr/local/php-4.0.6/modules:/usr/local/software/php-4.0.5/ext
/java:/usr/local/software/gcc-3.0/libjava
java.class.path=/usr/local/apache_modssl/php/lib/php/php_java.jar
extension_dir=/usr/local/software/php-4.0.5/modules
extension=libphp_java.so
The java program I am running (jver.php)
<html>
<?php
$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";
?>
</html>
Any help would be appreciated,
-- Bill Martin --
--
=======================================================================
William T. Martin email: [EMAIL PROTECTED]
Cornell University/ORIE Fax: (607) 255-9129
257 Rhodes Hall Phone: (607) 255-9134
Ithaca, NY 14853
Public Key: http://www.orie.cornell.edu/~martin/public_key.html
=======================================================================
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]