|
Posted by Good Man on 06/19/07 16:56
"Janna" <mistressjanna@hotmail.com> wrote in
news:4673d25f$0$16602$4c368faf@roadrunner.com:
> I have the Java JVM installes on my server.
>
> I uncommented
> extension=php_java.dll
> in php.ini
>
> I uncommented and proerpyl filled out the [java] section in php.ini:
> [Java]
> java.class.path
> ="C:\InstantRails\php\extensions\php_java.jar;C:\JavaSources\MyStuff"
> java.home = "C:\Program Files\Java\jdk1.5.0_10;C:\Program
> Files\Java\jre1.5.0_10\lib" java.library = "C:\Program
> Files\Java\jdk1.5.0_10\jre\bin\server\jvm.dll" java.library.path =
> "C:\InstantRails\php\extensions\;C:\Program
> Files\Java\jdk1.5.0_10\jre\lib"
Hi Janna
I've used Java with PHP before and it was a doozy to get going. To sum
it up, you have to make sure that the user under which Apache is running
has access to Java... or all users.
What I did was add the following to "/etc/profile":
pathmunge /usr/java/j2sdk1.4.2_14/bin
pathmunge /usr/java/j2sdk1.4.2_14/jre/bin
**************
Whoa whoa, wait, i just realized you are on Windows. I will leave the
stuff above as reference for people having issues with Linux!
For Windows, try the equivalent (from
http://java.sun.com/j2se/1.4.2/install-windows.html )
.. Update the PATH variable (Optional)
You can run the Java 2 SDK without setting the PATH variable, or you
can optionally set it as a convenience.
Should I set the PATH variable?
Set the PATH variable if you want to be able to conveniently run the
Java 2 SDK executables (javac.exe, java.exe, javadoc.exe, etc.) from
any directory without having to type the full path of the command.
If you don't set the PATH variable, you need to specify the full
path to the executable every time you run it, such as:
C:> \j2sdk1.4.2_<version>\bin\javac MyClass.java
It's useful to set the PATH permanently so it will persist after
rebooting.
How do I set the PATH permanently?
To set the PATH permanently, add the full path of the
j2sdk1.4.2_<version>\bin directory to the PATH variable. Typically
this full path looks something like C:\j2sdk1.4.2_<version>\bin. Set
the PATH as follows, according to whether you are on Microsoft
Windows NT or 98/2000/ME.
Microsoft Windows NT, 2000, and XP - To set the PATH permanently:
1. Choose Start, Settings, Control Panel, and double-click
System. On Microsoft Windows NT, select the Environment tab; on
Microsoft Windows 2000 select the Advanced tab and then
Environment Variables. Look for "Path" in the User Variables and
System Variables. If you're not sure where to add the path, add
it to the right end of the "Path" in the User Variables. A
typical value for PATH is:
C:\j2sdk1.4.2_<version>\bin
Capitalization doesn't matter. Click "Set", "OK" or "Apply".
The PATH can be a series of directories separated by
semi-colons (;). Microsoft Windows looks for programs in the
PATH directories in order, from left to right. You should only
have one bin directory for a Java SDK in the path at a time
(those following the first are ignored), so if one is already
present, you can update it to j2sdk1.4.2_<version>\bin.
2. The new path takes effect in each new Command Prompt window
you open after setting the PATH variable.
here's another reference:
http://ccism.pc.athabascau.ca/html/vhd/javapath.xml#xp
Good luck!!!!
Navigation:
[Reply to this message]
|