Women in Technology

Hear us Roar



Article:
  PHP 4.3 and Mac OS X
Subject:   Problems compiling Php4.3.1 with java on Mac OsX
Date:   2003-05-07 10:44:46
From:   anonymous2
First I configure Php with:
./configure --with-apxs --with-java=/Library/Java/Home
everything is OK, so I try to compile Php with
make
but I obtain many errors and warning messages about java components, like "jni.h: No such file or Directory", "parse errer before JavaVM", and many others. The Last is "Error 1".
I use Mac Os X 10.2.5 with yhe latest realease of Java 2 Platform, Standard Edition, version 1.4.1
Can help me, please?
Full Threads Oldest First

Showing messages 1 through 6 of 6.

  • Problems compiling Php4.3.1 with java on Mac OsX
    2004-04-07 18:04:14  jamfan [View]

    Just curious if anyone had figured out a solution to this problem with jni.h. I'm using 10.3.3 with Java 1.4.2.

    Thanks,
    • Problems compiling Php4.3.1 with java on Mac OsX
      2004-04-08 02:04:34  jamfan [View]

      Whoops... ignore my previous post. I seem to have missed the reply concerning downloading the newest release from the apple developer support site -- that seemed to fix the compilation problem, though i'm now having problems with a java.lang.UnsatisfiedLinkError whenever I try creating a basic Java object from PHP (instantiating a new java.lang.System object).
  • Problems compiling Php4.3.1 with java on Mac OsX
    2004-03-03 16:39:58  daveola [View]


    Make sure you've installed the latest Java Developer Package from developer.apple.com, otherwise you'll be missing needed java headers.

    Dave
    http://GetDave.com/
    http://MarginalHacks.com/
  • Problems compiling Php4.3.1 with java on Mac OsX
    2003-10-08 19:14:50  anonymous2 [View]

    I'm running into the same problem with a different compile, Open Office. I don't know if this will help but jni.h exists in Java 1.3.1 but not in 1.4.1 in their respective headers directories.

    You might want to check your java version and arrange for jni.h to be found.
    • Problems compiling Php4.3.1 with java on Mac OsX
      2004-02-27 05:04:16  tristanr [View]

      I also ran into trouble compiling an app on OSX 10.3 because of the missing jni.h library

      It turns out that the default file present in /System/Library/Frameworks/JavaVM.framework/Headers/ is actually a broken symbolic link! :

      root# ls -l /System/Library/Frameworks/JavaVM.framework/Headers/jni.h
      lrwxr-xr-x 1 root wheel 30 23 Feb 17:55 /System/Library/Frameworks/JavaVM.framework/Headers/OLD_jni.h -> ../../CurrentJDK/Headers/jni.h

      and this file doesn't exist!

      I managed to get it to compile by pointing the Java library path at the place where the Headers actually live, which is:

      /System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Headers

      Hope that helps,

      -Tristan.
  • Adam Trachtenberg photo Problems compiling Php4.3.1 with java on Mac OsX
    2003-05-12 22:17:11  Adam Trachtenberg | O'Reilly Author [View]

    I have a lot of problems getting Java to work with PHP, even when running Linux. The Java extension is not very actively maintained, so I'm not surprised that you're having difficulties. I don't even know if 1.4.1 works with PHP at all, unfortunately. Sorry I can't be more help here, maybe someone else can provide assistance.

    -adam