On 4/2/14, 5:48 PM, David Fang wrote:
> Updated on 10.7.
> Now uses /usr/libexec/java_home if it exists.
> (Doesn't exist on 10.4, for example).
> 
> Fang
> 
>> It's making unwarranted assumptions about my Java setup:
>>
>> #!/bin/sh -ev
>>      mkdir build
>>      cd build
>>      # old-location
>>      # JAVA_HOME=`/usr/libexec/java_home`
>>      JAVA_FW=/System/Library/Frameworks/JavaVM.framework
>>      JAVA_HOME=$JAVA_FW/Home
>>      test -d $JAVA_HOME && test -x $JAVA_HOME || \
>>        { echo "$JAVA_HOME not found." ; exit 1 ;}
>> /System/Library/Frameworks/JavaVM.framework/Home not found.
>>
>> $ /usr/libexec/java_home
>> /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
>>
>> I'm guessing that parsing `/usr/libexec/java_home` is a better way to go
>> here for portability and to deal with the wacked out Java in OS X.
>>

Hmm, not sure /usr/libexec/java_home is working with system-java.

On 10.9, something is trying to pull in ppl9, and I get the following:

-*-*-*-

sudo -u fink-bld [ENV] sh -c /tmp/fink.cMynt
/tmp/fink.udcB8
#!/bin/sh -ev
        mkdir build
        cd build
        if test -x /usr/libexec/java_home
        then JAVA_HOME=`/usr/libexec/java_home`
        else JAVA_FW=/System/Library/Frameworks/JavaVM.framework
                JAVA_HOME=$JAVA_FW/Home
        fi
/usr/libexec/java_home
        test -d $JAVA_HOME && test -x $JAVA_HOME || \
          { echo "$JAVA_HOME not found." ; exit 1 ;}
        JAVA_INCLUDE=$JAVA_HOME/include
        test -r $JAVA_INCLUDE/jni.h || JAVA_INCLUDE=$JAVA_FW/Headers
        test -r $JAVA_INCLUDE/jni.h || \
          { echo "Missing Java development package containing jni.h." ; \
          echo "Please download/install from connect.apple.com and try again." 
; \
          echo "Thank you and have a nice day." ; exit 1 ;}
Missing Java development package containing jni.h.
Please download/install from connect.apple.com and try again.
Thank you and have a nice day.

-*-*-*-

Fink bugged me to do the automatic "did somebody call for javac?"
download, and I think I have the JDK, as "fink list java" returns a
system-java-dev and several others for 1.4, 1.5 and 1.6.

I looked for jni.h, and aside from the one in gcc4.9, I found this:

/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni.h

/usr/libexec/java_home returns this:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

$ ls $(/usr/libexec/java_home )
bin/    bundle@ lib/    man/

Ideas? I'd rather not bother with Java 1.7, but if that's the easiest
way, let me know.

$ fink --version
Package manager version: 0.37.0
Distribution version: selfupdate-cvs Tue Jun 17 20:59:37 2014, 10.9, x86_64
Trees: local/main stable/main

Thanks,

- Charles Lepple

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Fink-users mailing list
Fink-users@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to