小编Dav*_*Dav的帖子

在 OSGI 应用程序 Mac OS X - Java 1.7 中引用时 ImageIO 挂起

我在 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 混合模式):

"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 …
Run Code Online (Sandbox Code Playgroud)

java osgi equinox osx-lion javax.imageio

4
推荐指数
1
解决办法
872
查看次数

标签 统计

equinox ×1

java ×1

javax.imageio ×1

osgi ×1

osx-lion ×1