[Bug 271467] java/javavmwrapper: setting a JAVAVM_OPTS breaks jps

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 17 May 2023 10:12:09 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271467

            Bug ID: 271467
           Summary: java/javavmwrapper: setting a JAVAVM_OPTS breaks jps
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: glewis@FreeBSD.org
          Reporter: KOT@MATPOCKuH.Ru
             Flags: maintainer-feedback?(glewis@FreeBSD.org)
          Assignee: glewis@FreeBSD.org

When JAVAVM_OPTS is set (locally, or using javavm_opts.conf) jps wrapper from
this port breaks an original jps:
$ JAVAVM_OPTS=-Xmx1G
$ export JAVAVM_OPTS
$ jps
illegal argument: -Xmx1G
usage: jps [--help]
       jps [-q] [-mlvV] [<hostid>]

Definitions:
    <hostid>:      <hostname>[:<port>]
    -? -h --help -help: Print this help message and exit.

/usr/local/openjdk17/bin/jps does not accept arguments like -Xmx,
-XX:MaxHeapSize and more.
As workaround JAVAVM_OPTS can be passed into a jps via environment variable
_JAVA_OPTIONS

-- 
You are receiving this mail because:
You are the assignee for the bug.