Re: PHP i need help please

From: Date: Tue, 17 Jun 2003 12:45:31 +0000
Subject: Re: PHP i need help please
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-20382@lists.php.net to get a copy of this message
hehehe that worked thank you! amazing what correct syntax can do! Danke! "Daniel Beulshausen" <daniel@php4win.de> wrote in message news:5.2.0.9.2.20030617143004.00b1c008@pop.puretec.de... At 07:25 17.06.2003 -0400, Kevin Ison wrote: >Im trying to make calls to java classes and I keep getting class not found >errors... I got this idea from a tutorial. I have the extensions >uncommented as well in the PHP ini file. > > my set up follows: > >php.ini: >.... >[Java] >java.class.path = C:\apache\php\JAVA\php_java.jar;c:\apache\htdocs\ktest\;. >java.home = C:\j2sdk1.4.1_01\bin\ >java.library = C:\j2sdk1.4.1_01\jre\bin\server\jvm.dll >java.library.path = C:\apache\php\extensions\;C:\apache\php\;.\ ext/java configuration is a bit tricky, however something like the following should work: [Java] java.class.path = c:\php\extensions\php_java.jar java.home = c:\j2sdk1.4.1_01\jre java.library = c:\j2sdk1.4.1_01\jre\bin\client\jvm.dll java.library.path = c:\php\extensions\ >the PHP source code: ><? >$myClass = new Java("java.io.file","c:\apache\logs\error.log"); >if ($myClass->exists()) { > echo "File path is ".$myClass->getAbsolutePath()."<br/>"; >} else { > echo "<br/> blah no workie <br/>"; >} >?> > >resulting output: >Warning: java.lang.ClassNotFoundException: java.io.file in >c:\apache\htdocs\ktest\xzerror.php on line 1 >Fatal error: Call to a member function on a non-object in >c:\apache\htdocs\ktest\xzerror.php on line 2 > > >anything obvious i am missing? AFAIR java is case sensitive :) try: $myClass = new Java("java.io.File","c:\\apache\\logs\\error.log"); mit freundlichen grüßen aus berlin, daniel /*-- Daniel Beulshausen - daniel@php4win.com Using PHP on Windows? http://www.php4win.com

« previous php.windows (#20382) next »