<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WEB-NES-BAY &#187; Library Path</title>
	<atom:link href="http://webnesbay.com/tag/library-path/feed/" rel="self" type="application/rss+xml" />
	<link>http://webnesbay.com</link>
	<description>Learn Tips and tricks on Linux, Hacking, linux, PHP, Perl, Web, Hardware</description>
	<lastBuildDate>Sun, 11 Apr 2010 05:12:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Interacting Java with PHP</title>
		<link>http://webnesbay.com/interacting-java-with-php/</link>
		<comments>http://webnesbay.com/interacting-java-with-php/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 04:56:57 +0000</pubDate>
		<dc:creator>WEBNESBAY</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Bin Directory]]></category>
		<category><![CDATA[C Web]]></category>
		<category><![CDATA[Class Path]]></category>
		<category><![CDATA[Double Quotes]]></category>
		<category><![CDATA[Java Class]]></category>
		<category><![CDATA[Java Classes]]></category>
		<category><![CDATA[Java Dll]]></category>
		<category><![CDATA[Java Extension]]></category>
		<category><![CDATA[java interaction]]></category>
		<category><![CDATA[Java Jar]]></category>
		<category><![CDATA[Java Library]]></category>
		<category><![CDATA[Java Sun]]></category>
		<category><![CDATA[Jdk]]></category>
		<category><![CDATA[Library Path]]></category>
		<category><![CDATA[Older Versions]]></category>
		<category><![CDATA[Path C]]></category>
		<category><![CDATA[Path Environment]]></category>
		<category><![CDATA[Path Path]]></category>
		<category><![CDATA[Php 4]]></category>
		<category><![CDATA[Windows 9x]]></category>
		<category><![CDATA[Windows Installation]]></category>

		<guid isPermaLink="false">http://webnesbay.com/?p=246</guid>
		<description><![CDATA[The Java extension is an extremely exciting tool. By learning how to use this  module, you can extend PHP by the power of all available Java classes. To show  you the basics of the Java extension, this article will cover installation and a  few code examples of using PHP and Java together.
I have tried on Windows Installation. Need to check on linux  
The following configuration has been tested with Apache 1.3.12, PHP 4.0.3 binaries from www.php4win.de [...]


Related posts:<ol><li><a href='http://webnesbay.com/run-java-web-start-on-hardy-amd64/' rel='bookmark' title='Permanent Link: Run Java web start on Hardy AMD64'>Run Java web start on Hardy AMD64</a></li>
<li><a href='http://webnesbay.com/browse-remote-directories-in-python/' rel='bookmark' title='Permanent Link: Browse remote directories in python'>Browse remote directories in python</a></li>
<li><a href='http://webnesbay.com/type-checking-in-python/' rel='bookmark' title='Permanent Link: Type Checking in Python'>Type Checking in Python</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div>The Java extension is an extremely exciting tool. By learning how to use this  module, you can extend PHP by the power of all available Java classes. To show  you the basics of the Java extension, this article will cover installation and a  few code examples of using PHP and Java together.</div>
<div>I have tried on Windows Installation. Need to check on linux <img src='http://webnesbay.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </div>
<div>The following configuration has been tested with <a href="http://httpd.apache.org/" target="_blank">Apache 1.3.12</a>, PHP 4.0.3 binaries from <a href="http://www.php4win.de/" target="_blank">www.php4win.de</a> plus the  <a href="http://www.zend.com/" target="_blank">4.0.3 Zend Optimiser</a> and JDK 1.2.2 from <a href="http://java.sun.com/j2se/?frontpage-javaplatform" target="_blank">java.sun.com</a>. I  have also tested this configuration with older versions of the JDK and windows 2000 later.</div>
<div><strong>Step 1: Install the JDK</strong>. This is fairly simple, as the JDK installs without  many questions. It might be useful to check your environment (autoexec.bat in  Windows 9x and System under Control Panel in NT) and make sure the jdk1.x.x\bin  directory is in your path.</div>
<div>This will make compiling your Java Classes easier. On Win9x add</p>
<div>PATH=%PATH%;C:\jdk1.2.2\bin</div>
<p>to your autoexec.bat. On NT add</p>
<div>;C:\jdk1.2.2\bin</div>
<p>to the end of the PATH environment variable.  It is also important to note in  your autoexec.bat file, the PHP Java extension <strong>ignores</strong> the JAVA_HOME  and CLASSPATH set up in the environment. This is important because these items must be  set correctly in your php.ini file for the Java extension to work.</div>
<div><strong>Step 2: Modifying your php.ini</strong>. You need to add something similiar to your  php.ini file.</div>
<div>
<pre>[java]
extension=php_java.dll
java.library.path=c:\web\php4\extensions\
java.class.path="c:\web\php4\extensions\jdk1.2.2\php_java.jar;c:\myclasses"</pre>
</div>
<div>Typically, people put the <code>extension=php_java.dll</code> directive with the rest of  the extensions, but it can sit happily under [java]. The <code>java.library.path</code> must be set in the location of the php_java.dll, and <code>java.class.path</code> must  include the location of <code>php_java.jar</code>.  The <code>java.class.path</code> should also include the path to other classes you may wish  to use (note the double quotes!).  In these examples, we will be talking about c:\myclasses. You should also note  that the single period is ignored by PHP and Java. As far as we know, you cannot set  PHP to look in the current directory for its Java classes.</div>
<div><strong>Step 3: Testing your Install</strong>. Now, you&#8217;re ready to go. Create a PHP file that  looks something like this:</div>
<div>
<pre>&lt;?php

  $system = new Java("java.lang.System");
  print "Java version=".$system-&gt;getProperty("java.version")." &lt;br&gt;\n";
  print "Java vendor=".$system-&gt;getProperty("java.vendor")." &lt;p&gt;\n\n";
  print "OS=".$system-&gt;getProperty("os.name")." ".
              $system-&gt;getProperty("os.version")." on ".
              $system-&gt;getProperty("os.arch")." &lt;br&gt;\n";

  $formatter = new Java("java.text.SimpleDateFormat","EEEE,
	MMMM dd, yyyy 'at' h:mm:ss a zzzz");
  print $formatter-&gt;format(new Java("java.util.Date"))."\n";

?&gt;</pre>
</div>
<div>If you have correctly  installed everything, you should see some results like:</div>
<div>
<pre>Java version=1.2.2
Java vendor=Sun Microsystems Inc.
OS=Windows 2000 4.10 on x86
Wednesday, June 18, 2009 at 10:22:45 AM India Standard Time</pre>
</div>


<p>Related posts:<ol><li><a href='http://webnesbay.com/run-java-web-start-on-hardy-amd64/' rel='bookmark' title='Permanent Link: Run Java web start on Hardy AMD64'>Run Java web start on Hardy AMD64</a></li>
<li><a href='http://webnesbay.com/browse-remote-directories-in-python/' rel='bookmark' title='Permanent Link: Browse remote directories in python'>Browse remote directories in python</a></li>
<li><a href='http://webnesbay.com/type-checking-in-python/' rel='bookmark' title='Permanent Link: Type Checking in Python'>Type Checking in Python</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://webnesbay.com/interacting-java-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
