Java的的UnsatisfiedLinkError awt.image [英] java UnsatisfiedLinkError awt.image
问题描述
我有一个程序,利用下面的方法来获取图像图标缩放实例:
I have a program that makes use of the following method to get a scaled instance of an image icon:
public ImageIcon createScaledImageIcon(String filename) {
ImageIcon icon = new ImageIcon(filename);
Image image = icon.getImage().getScaledInstance(cardWidth, cardHeight, Image.SCALE_SMOOTH);
icon.setImage(image);
return icon;
}
我不知道这是否是问题或没有的来源。但我得到以下错误消息:
I don't know if it's the source of the problem or not. But i get the following error messages:
异常螺纹图像撷取0java.lang.UnsatisfiedLinkError中:sun.awt.image.ImageRe presentation.setBytePixels(IIII [BIILsun / AWT /图像/ ByteComponentRaster; I)在sun.awt.image V .ImageRe presentation.setBytePixels(本机方法)
Exception in thread "Image Fetcher 0" java.lang.UnsatisfiedLinkError: sun.awt.image.ImageRepresentation.setBytePixels(IIII[BIILsun/awt/image/ByteComponentRaster;I)V at sun.awt.image.ImageRepresentation.setBytePixels(Native Method)
在sun.awt.image.ImageRe presenation.setPixels(来源不明)
at sun.awt.image.ImageRepresenation.setPixels(Unknown Source)
在sun.awt.image.ImageDe coder.setPixels(来源不明)
at sun.awt.image.ImageDecoder.setPixels(Unknown Source)
在sun.awt.image.GIFImageDe coder.sendPixels(来源不明)...
at sun.awt.image.GIFImageDecoder.sendPixels(Unknown Source) ...
让我知道是否有任何其他信息,我可以包括可能是有用的。
Let me know if there is any other information I could include that might be of use.
推荐答案
尝试重新安装最新版本的Java。您的安装可能是不完整/损坏(读类似的经历)
Try reinstalling the latest version of Java. Your installation may have been incomplete/corrupt (read similar experience).
这篇关于Java的的UnsatisfiedLinkError awt.image的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!