I'm re-asking this question after a few months of being away from it -- doing a fresh Mac OS X install and the same question jumps to mind (I am now modifying my installer to overwrite the Info.plist file, which unfortunately means it will now require sudo).
Is there a reason this "capability" is not declared in the JDK's Info.plist by default? -- David P. Caldwell http://www.davidpcaldwell.com/ On Fri, Apr 11, 2014 at 3:37 PM, David P. Caldwell <da...@code.davidpcaldwell.com> wrote: > Petr, Thanks for sending me to the right list. > > I have an application that has a native wrapper that launches a Java > virtual machine. It essentially is a shell language like Python that > provides an embedding of the Rhino script engine (perhaps Nashorn at > some point) so that one can write "shell scripts" in JavaScript. > > The native wrapper provides mostly a convenience, but it is very > helpful. When invoking the shell, you can do: > > /usr/local/jsh/jsh [script] > > You can also use the hashbang: > > #!/usr/local/jsh/jsh > > So it's a nice feature to have. > > On other UNIXes, and even Cygwin, I am able to easily build the native > wrapper from source. On Mac OS X, the build succeeds, but at least > with JDK 8 on Mac OS X 10.9, I get a failure when I attempt to launch > the shell, claiming I need a Java SE 6 installation to proceed and > prompting me to install one. > > I was able to get rid of this issue by modifying the JDK's Info.plist > to include the JNI "capability." > > I can see the "capability" has been limited to just command-line ever > since the initial commit of the Mac OS X port into OpenJDK. However, > it is clear the port *has* the "capability" as everything worked fine > as soon as I added that capability to the manifest. > > So my question is, is there a reason that we ship with that capability > disabled by default? > > -- David P. Caldwell > http://www.davidpcaldwell.com/ > > On Fri, Apr 11, 2014 at 3:16 PM, Petr Pchelko <petr.pche...@oracle.com> wrote: >> Hello, David. >> >> A better alias to ask this is a macosx port alias. >> Could you please clarify your question: >> Are you using a native bundle? >> Are you writing a UI application? >> How do you get an Info.plist you talk about? just JDK has no info.plist.. >> >> With best regards. Petr. >> >> 11 апр. 2014 г., в 5:50 после полудня, David P. Caldwell >> <da...@code.davidpcaldwell.com> написал(а): >> >>> Is there a reason that JDK 8 does not declare the full set of >>> "capabilities" (from the OS X point of view) in the OS-specific >>> Info.plist file? >>> >>> I just discovered that my JNI application broke because it uses native >>> code to launch a JVM, but was able to fix it simply by adding the JNI >>> "capability." So clearly it *has* that capability. >>> >>> -- David P. Caldwell >>> http://www.davidpcaldwell.com/ >>