apache/apisix-java-plugin-runner

help request: how to add more vm configurations for the java plugin

mayunSaicmotor opened this issue · 6 comments

Description

Dear,
I want to add more vm configuration(--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED) for the cmd, but does not work.
ext-plugin:
cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar']

I tried the 2 ways , both don't work. Is there anyway to add vm configurations?
cmd: ['/jdk17/bin/java', '--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED', '-jar', '-Xmx1g', '-Xms1g', '/path/to/dubbo-plugin-0.0.1-SNAPSHOT.jar'] # d

cmd: ['/jdk17/bin/java', '--add-opens java.base/java.lang=ALL-UNNAMED', '--add-opens java.base/java.math=ALL-UNNAMED', '--add-opens java.base/java.util=ALL-UNNAMED', '--add-opens java.base/java.lang.reflect=ALL-UNNAMED', '-jar', '-Xmx1g', '-Xms1g', '/path/to/dubbo-plugin-0.0.1-SNAPSHOT.jar']

image

Environment

  • APISIX version (run apisix version):3.7.0
  • Operating system (run uname -a):linux centos 7

Dear shreemaan-abhishek,could you help me?

Dear @shreemaan-abhishek ,could you help me?

Dear @lakshya8066 could you help me? Recently I am writing java plugin demo, but blocked by this issue.I can't move forward anymore.

Hi @mayunSaicmotor I still doing a deep dive into the issues here. Not sure if I can help soon enough.

Dear @lakshya8066 ,is there any update?

remove all whitespace and it ok now
cmd: ['/jdk17/bin/java', '--add-opens', 'java.base/java.lang=ALL-UNNAMED', '--add-opens', 'java.base/java.math=ALL-UNNAMED', '--add-opens', 'java.base/java.util=ALL-UNNAMED', '--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED', '-jar', '/path/to/dubbo-plugin-0.0.1-SNAPSHOT-exec.jar']