Hotswapping with JBR and HotSwapAgent

hey, im trying to install the jetbrain runtime in a docker container along with hotswap agent. I am running on an arm ubuntu machine and tried the aarch JBR releases JCEF (fastdebug) and JBRSDK. I put the hotswap-agent.jar in lib/hotswap and i still get the error Unrecognized VM option 'AllowEnhancedClassRedefinition', im using java 21
17 Replies
JavaBot
JavaBot2w ago
This post has been reserved for your question.
Hey @Lianecx! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Lianecx
LianecxOP2w ago
services:
testing-server:
image: itzg/minecraft-server:java21
container_name: testing-server
ports:
- "25565:25565"
- "11111:11111"
- "19132:19132/udp"
- "5005:5005"
environment:
VERSION: "LATEST"
EULA: TRUE
TYPE: "PAPER"
OPS: "Lianecx"
ENABLE_WHITELIST: FALSE
SERVER_PORT: 25565
ENFORCE_WHITELIST: TRUE
INIT_MEMORY: 5G
MEMORY: 5G
GUI: FALSE
ENABLE_ROLLING_LOGS: true
USE_AIKAR_FLAGS: false
UID: 1001
GID: 1001

# HotSwapping
JAVA_HOME: /opt/jbr
JVM_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
JVM_XX_OPTS: "-XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar"
tty: true
stdin_open: true
restart: 'no'
volumes:
# attach a directory relative to the directory containing this compose file
- ./data:/data

# HotSwapping
- /home/ubuntu/jbr_fd-21.0.8-linux-aarch64-b1138.52:/opt/jbr:ro
services:
testing-server:
image: itzg/minecraft-server:java21
container_name: testing-server
ports:
- "25565:25565"
- "11111:11111"
- "19132:19132/udp"
- "5005:5005"
environment:
VERSION: "LATEST"
EULA: TRUE
TYPE: "PAPER"
OPS: "Lianecx"
ENABLE_WHITELIST: FALSE
SERVER_PORT: 25565
ENFORCE_WHITELIST: TRUE
INIT_MEMORY: 5G
MEMORY: 5G
GUI: FALSE
ENABLE_ROLLING_LOGS: true
USE_AIKAR_FLAGS: false
UID: 1001
GID: 1001

# HotSwapping
JAVA_HOME: /opt/jbr
JVM_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
JVM_XX_OPTS: "-XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar"
tty: true
stdin_open: true
restart: 'no'
volumes:
# attach a directory relative to the directory containing this compose file
- ./data:/data

# HotSwapping
- /home/ubuntu/jbr_fd-21.0.8-linux-aarch64-b1138.52:/opt/jbr:ro
this is my docker compose
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Lianecx
LianecxOP2w ago
its only a problem inside of docker, outside it works
Peter Rader
Peter Rader2w ago
In the docker compose you wrote JVM_XX_OPTS: "-XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar" Have you tried to use JVM_XX_OPTS: "-XX:HotswapAgent=fatjar" instead?
Lianecx
LianecxOP2w ago
yea well i do want the enhanced class redefinition though and if i run itousdie of docker, it works with the option its also incredibly slow to the point its not usable anymore
Peter Rader
Peter Rader2w ago
They decided that its not gona work. They dropped the feature. You need a JDK version that support AllowEnhancedClassRedefinition. Its JDK8. Going back from 21 to 8 is a dealbreaker?
dan1st
dan1st2w ago
Is that even a question?
Peter Rader
Peter Rader2w ago
Yes, sentences with a questionmark at the end used to be questions. The more you know ... 😄
dan1st
dan1st2w ago
I meant that going back from JDK 21 to JDK 8 is normally not an option and definitely shouldn't be Also what's the Dockerfile?
Peter Rader
Peter Rader2w ago
He posted the docker compose.
dan1st
dan1st2w ago
yes but that uses an image I don't know so I want to see the Dockerfile used to generate that image
Peter Rader
Peter Rader2w ago
There is no image. The docker compose is in text form. I see you like to take the question from here. I let it in behalf of your hands mate. I am out, bye.
dan1st
dan1st2w ago
image: itzg/minecraft-server:java21
that's in the Docker compose file and I want to know how the image itzg/minecraft-server:java21 was built - which normally happens using a Dockerfile a Docker compose file is useless without an image somewhere
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Peter Rader
Peter Rader2w ago
Oh I knew I remember the JVMFlag. It is a hotswapagent.org thing. You need Jetbrains17 not 21. 21 is not supported.
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?