简体   繁体   English

imageio.read与mac

[英]imageio.read with mac

I am facing very bad problem. 我面临着非常糟糕的问题。 I have program which is try to read the image file and I am doing some operation on that. 我有程序试图读取图像文件,我正在做一些操作。 The same code which is running from windows and when I am try to run same code in apple mac mini (os: 10.7) it getting stuck I a have notice that when compiler comming to line ImageIO.read(file) then it is getting stuck (no exception and error) ang passing correct file and file is not null. 从Windows运行的相同代码,当我尝试在apple mac mini(os:10.7)中运行相同的代码时,它会卡住我已经注意到当编译器进入行ImageIO.read(file)它会卡住(没有例外和错误)ang传递正确的文件和文件不为空。 Can any one tell what could be the problem? 任何人都可以告诉可能是什么问题吗?

The problem probably comes from your VM arguments, it happens when you use -XstartOnFirstThread . 问题可能来自您的VM参数,当您使用-XstartOnFirstThread时会发生这种情况。
If this argument is on then AWT won't be able to load up and will make the program hang. 如果此参数打开,则AWT将无法加载并将使程序挂起。 To solve this you can add -Djava.awt.headless=true to tell AWT not to load at all. 要解决这个问题,您可以添加-Djava.awt.headless=true来告诉AWT根本不加载。

Source: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8019496 来源: http//bugs.java.com/bugdatabase/view_bug.do?video_id = 8019496

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM