Skip Menu |

This queue is for tickets about the Inline-Java CPAN distribution.

Report information
The Basics
Id: 122833
Status: open
Priority: 0/
Queue: Inline-Java

People
Owner: Nobody in particular
Requestors: GUIDO [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.58
Fixed in: (no value)



Subject: Java commands are not found on recent Mac OS X
I'm using macOS Sierra (10.12.6), vanilla Java installation. $JAVA_HOME is /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home. It contains a subdirectory "bin" but not "Commands" as expected by Makefile.PL. /usr/bin/javac is a symbolic link to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac I don't have access to other macOS or Java versions so I have no idea how to portably solve this. Maybe Java::Portable should return an array for J2SDK_BIN so that multiple locations are searched? In any case, J2SDK_BIN for darwin should give "bin" as this seems to be the more recent location. If anybody runs into the same problem: Manually change Inline-Java/Java/Portable.pm (replace "Commands" with "bin") or sudo ln -s ${JAVA_HOME}/bin ${JAVA_HOME}/Commands before you build the extension.
I've just added a facility for code-refs to be run in Portable::portable (outside of the SUB_* keys which already had that), and made it search for the right location for DEFAULT_J2SDK_DIR. Could you let me know what similar values I'd put in to search for the J2SDK_BIN?
Am Di 03. Apr 2018, 17:09:51, ETJ schrieb: Show quoted text
> I've just added a facility for code-refs to be run in > Portable::portable (outside of the SUB_* keys which already had that), > and made it search for the right location for DEFAULT_J2SDK_DIR. > > Could you let me know what similar values I'd put in to search for the > J2SDK_BIN?
In the meantime, my "javac" is again in "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac", looks Oracle changes that from time to time. I don't know about other locations. The Makefile.PL runs through and terminates successfully but throws another error message at the end: ... Building JNI extension. Can't locate file 'libjvm.dylib' anywhere under '/System/Library/Frameworks/JavaVM.framework/Versions/Current' Generating a Unix-style Makefile Writing Makefile for Inline::Java Writing MYMETA.yml and MYMETA.json And then "make" ultimately fails: make[1]: Makefile: No such file or directory make[1]: *** No rule to make target `Makefile'. Stop. make: *** [subdirs] Error 2 And there really is no "Java/Makefile" at this point. I have MakeMaker 7.34 (Revision: 73400). I have verified that WriteMakefile() gets invoked with DIR => ['Java'] but still "Java/Makefile" is not generated. I have tried the latest git version and 0.66 from CPAN.