apache / apisix-java-plugin-runner

APISIX Plugin Runner in Java
https://apisix.apache.org/
Apache License 2.0
130 stars 96 forks source link

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

Closed mayunSaicmotor closed 9 months ago

mayunSaicmotor commented 9 months ago

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

mayunSaicmotor commented 9 months ago

Dear shreemaan-abhishek,could you help me?

mayunSaicmotor commented 9 months ago

Dear @shreemaan-abhishek ,could you help me?

mayunSaicmotor commented 9 months ago

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

lakshya8066 commented 9 months ago

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

mayunSaicmotor commented 9 months ago

Dear @lakshya8066 ,is there any update?

mayunSaicmotor commented 9 months ago

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']