OpenJDK的:我使用的OpenJDK 8时,这个码头工人形象得到这个堆栈跟踪8 JRE高山
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
at java.lang.Class.forName0(Native Method) [rt.jar:1.8.0_131]
at java.lang.Class.forName(Class.java:348) [rt.jar:1.8.0_131]
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:82) [rt.jar:1.8.0_131]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_131]
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74) [rt.jar:1.8.0_131]
at java.awt.Font.getFont2D(Font.java:491) [rt.jar:1.8.0_131]
at java.awt.Font.getFontName(Font.java:1279) [rt.jar:1.8.0_131]
at java.awt.Font.getFontName(Font.java:1261) [rt.jar:1.8.0_131]
它使用的Oracle版本工作正常
以下一些方向从这里安装DejaVu字体: https://hub.docker.com/r/neduekwunife/openjdk8-jre-alpine-with-fontconfig/
添加以下行到我的Dockerfile:
RUN apk add --update ttf-dejavu && rm -rf /var/cache/apk/*
现在给了我下面的错误:
java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libfontmanager.so: Error relocating /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libfontmanager.so: AWTFontDefaultChar: symbol not found