我只是将我的java版本从java 6升级到java 7,我得到了这个堆栈跟踪。我正在使用java 7_u80。 `
Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.font.SunFontManager
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:819)
at org.jfree.text.G2TextMeasurer.getStringWidth(G2TextMeasurer.java:78)
at org.jfree.text.TextUtilities.nextLineBreak(TextUtilities.java:248)
at org.jfree.text.TextUtilities.createTextBlock(TextUtilities.java:187)
at org.jfree.text.TextUtilities.createTextBlock(TextUtilities.java:155)
at org.jfree.chart.plot.PiePlot.drawLeftLabels(PiePlot.java:1822)
at org.jfree.chart.plot.PiePlot.drawLabels(PiePlot.java:1787)
at org.jfree.chart.plot.PiePlot3D.draw(PiePlot3D.java:517)
at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1058)
at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1244)
at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1223)
at org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:173)
at org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:328)
at com.PMSystems.charts.GenerateChart.generatePieChart(GenerateChart.java:340)
at org.apache.jsp.report.PMSCampaignSummaryDetail_jsp._jspService(PMSCampaignSummaryDetail_jsp.java:1886)
... 25 more
` 当我升级java版本的任何建议时,这只会发生吗?
答案 0 :(得分:0)
运行LD_LIBRARY_PATH设置为旧位置的Android Studio时遇到此错误。
尝试取消设置LD_LIBRARY_PATH并再次运行。
答案 1 :(得分:0)
在 OpenJDK 64 位服务器版本“11.0.9.1” 2020-11-04 上遇到同样的问题
见http://bugzilla.redhat.com/show_bug.cgi?id=1768935
已通过迁移到 Amazon Corretto 版本“11.0.7” 2020-04-14 LTS 解决
https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/docker-install.html