debugging 为什么调试在java 11中不起作用?

jdzmm42g  于 2022-11-14  发布在  Java
关注(0)|答案(1)|浏览(150)

这正在使用我的Dockerfile

FROM lpicanco/java11-alpine
VOLUME /tmp
ADD knetconfig /tmp/knetconfig
ADD grpc_health_probe_linux_x64 /app/grpc_health_probe_linux_x64
RUN chmod +x /app/grpc_health_probe_linux_x64
ADD aero-pay-core-service-latest.jar app.jar
RUN sh -c 'touch /app.jar'
EXPOSE 5005
ENV JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Djava.security.egd=file:/dev/./urandom"
ENTRYPOINT java $JAVA_OPTS -jar /app.jar

但在构建时出现此错误,我使用的是java 11,

Error occurred during initialization of VM
Could not find agent library jdwp on the library path, with error: libjdwp.so: cannot open shared object file: No such file or directory

最好的选择是什么?

5cg8jx4n

5cg8jx4n1#

可能是JDK11的alpine版本被调整为最小化内存占用。可能是调试库被删除或从未安装。

相关问题