gpt4 book ai didi

java.lang.NoClassDefFoundError : Could not initialize class sun. 字体.SunFontManager

转载 作者:太空宇宙 更新时间:2023-11-04 12:26:45 29 4
gpt4 key购买 nike

我刚刚将我的 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 版本时才会发生这种情况有什么建议吗?

最佳答案

我在运行 Android studio 并将 LD_LIBRARY_PATH 设置为旧位置时遇到此错误。
尝试取消设置 LD_LIBRARY_PATH 并再次运行。

关于java.lang.NoClassDefFoundError : Could not initialize class sun. 字体.SunFontManager,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38304128/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com