Bug 271467 - java/javavmwrapper: setting a JAVAVM_OPTS breaks jps
Summary: java/javavmwrapper: setting a JAVAVM_OPTS breaks jps
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Greg Lewis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-17 10:12 UTC by Dmitry Afanasiev
Modified: 2023-05-17 10:12 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (glewis)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Afanasiev 2023-05-17 10:12:09 UTC
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