2

当我从 Eclipse(指定的所有类)中使用 JAI 时,它工作得很好,但是当我将所有内容捆绑在一个 jar 中并从中创建一个 shell 脚本文件并尝试运行该脚本时,我遇到了 javax.media 的问题。 jai.OperationRegistry 正在寻找一个初始化文件。

有没有其他人看到这个问题?

例外:

Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
    at javax.media.jai.TiledImage.<init>(TiledImage.java:259)
    at javax.media.jai.TiledImage.<init>(TiledImage.java:222)
    at org.syntec.ivb.img.SingleShot.<init>(SingleShot.java:75)
    at org.syntec.ivb.jni.GetCapture.<init>(GetCapture.java:21)
    at org.syntec.ivb.application.SampleWindow$4.actionPerformed(SampleWindow.java:178)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6288)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6053)
    at java.awt.Container.processEvent(Container.java:2045)
    at java.awt.Component.dispatchEventImpl(Component.java:4649)
    at java.awt.Container.dispatchEventImpl(Container.java:2103)
    at java.awt.Component.dispatchEvent(Component.java:4475)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
    at java.awt.Container.dispatchEventImpl(Container.java:2089)
    at java.awt.Window.dispatchEventImpl(Window.java:2587)
    at java.awt.Component.dispatchEvent(Component.java:4475)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:675)
    at java.awt.EventQueue.access$300(EventQueue.java:96)
    at java.awt.EventQueue$2.run(EventQueue.java:634)
    at java.awt.EventQueue$2.run(EventQueue.java:632)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
    at java.awt.EventQueue$3.run(EventQueue.java:648)
    at java.awt.EventQueue$3.run(EventQueue.java:646)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:645)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.lang.RuntimeException: Registry initialization file not found.
    at javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:365)
    at javax.media.jai.JAI.<clinit>(JAI.java:566)
    ... 41 more
4

0 回答 0