view build-aux/OctJavaQry.java @ 20515:ad7fe3cb6fd2

pkg: fix regression on output of pkg list (bug #45873) * scripts/pkg/pkg.m: cset 7fa1970a655d reduced the checks to nargout to is there nargout or not. However, the subfunction installed_packages() returns alternative things based on its own nargout (it probably should not since that makes for a messy code). Fix, pkg to call the subfunction correctly based on its nargout too (but still, use "nargout > 1" instead of "nargout == 2". * scripts/pkg/private/installed_packages.m: do not check for exact number of nargout and reduce number of function return points.
author Carnë Draug <carandraug@octave.org>
date Fri, 04 Sep 2015 18:47:54 +0100
parents fafd51a1b0f0
children
line wrap: on
line source

// Code used by configure script to locate Java installation variables.
// Only compiled code, OctJavaQry.class, is distributed.
public class OctJavaQry
{
  public static void main (String[] args)
  {
    if (args.length > 0)
    {
      if (args[0].equals ("JAVA_HOME"))
      {
        System.out.println (System.getProperty ("java.home"));
      }
      else if (args[0].equals ("JAVA_LDPATH"))
      {
        System.out.println (System.getProperty ("java.library.path"));
      }
      else if (args[0].equals ("JAVA_BOOTPATH"))
      {
        System.out.println (System.getProperty ("sun.boot.library.path"));
      }
    }
  }
}