我在 Mac OS X 10.7.5 上使用 Java 1.7。它在执行触及任何 ImageIO API 的那一刻挂起。
import javax.imageio.ImageIO;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
public class ImageMain implements IApplication {
@Override
public Object start(IApplicationContext context) throws Exception {
ImageIO.getCacheDirectory();
return IApplication.EXIT_OK;
}
@Override
public void stop() {
// TODO Auto-generated method stub
}
}
Run Code Online (Sandbox Code Playgroud)
jstack 输出:
013-12-03 11:37:57 全线程转储 Java HotSpot(TM) 64 位服务器 VM(24.0-b56 混合模式):
Run Code Online (Sandbox Code Playgroud)"Attach Listener" daemon prio=5 tid=0x00007fbada8c5000 nid=0x8a23 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "Worker-JM" prio=5 tid=0x00007fbadb941000 nid=0x6007 in Object.wait() [0x0000000116ee6000] java.lang.Thread.State: WAITING (on …