libt2k.so在armv7上执行jar时出错,如何解决?

时间:2012-12-08 20:26:52

标签: java arm armv7

我已经编译了一个带有swing for GUI的简单java应用程序。如果我在x86系统上运行它,它可以正常工作。如果我在armv7上运行它(带有JVM headfull isntalled)它会返回以下错误:

aldo@aldo-desktop:~/test_java$ java -jar ../test_gui_jigloo_fat.jar 
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: /opt/ejre1.7.0_06/lib/arm/libt2k.so: /opt/ejre1.7.0_06/lib/arm/libt2k.so: invalid ELF header (Possible cause: endianness mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1846)
    at java.lang.Runtime.loadLibrary0(Runtime.java:845)
    at java.lang.System.loadLibrary(System.java:1084)
    at sun.font.T2KFontScaler$1.run(T2KFontScaler.java:50)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.T2KFontScaler.<clinit>(T2KFontScaler.java:41)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:186)
    at sun.font.FontScaler.<clinit>(FontScaler.java:100)
    at sun.font.TrueTypeFont.getScaler(TrueTypeFont.java:1248)
    at sun.font.FileFontStrike.<init>(FileFontStrike.java:177)
    at sun.font.FileFont.createStrike(FileFont.java:95)
    at sun.font.Font2D.getStrike(Font2D.java:344)
    at sun.font.Font2D.getStrike(Font2D.java:293)
    at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:77)
    at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
    at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359)
    at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350)
    at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302)
    at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:800)
    at generic.TextPanel.paintComponent(TextPanel.java:26)
    at javax.swing.JComponent.paint(JComponent.java:1054)
    at javax.swing.JComponent.paintChildren(JComponent.java:887)
    at javax.swing.JComponent.paint(JComponent.java:1063)
    at javax.swing.JComponent.paintChildren(JComponent.java:887)
    at javax.swing.JComponent.paint(JComponent.java:1063)
    at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
    at javax.swing.JComponent.paintChildren(JComponent.java:887)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
    at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
    at javax.swing.JComponent.paint(JComponent.java:1040)
    at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
    at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
    at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
    at java.awt.Container.paint(Container.java:1967)
    at java.awt.Window.paint(Window.java:3877)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
    at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
    at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
    at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:711)
    at java.awt.EventQueue.access$000(EventQueue.java:104)
    at java.awt.EventQueue$3.run(EventQueue.java:672)
    at java.awt.EventQueue$3.run(EventQueue.java:670)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:681)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class sun.font.FontScaler
    at sun.font.TrueTypeFont.getScaler(TrueTypeFont.java:1248)
    at sun.font.FileFontStrike.<init>(FileFontStrike.java:177)
    at sun.font.FileFont.createStrike(FileFont.java:95)
    at sun.font.Font2D.getStrike(Font2D.java:344)
    at sun.font.Font2D.getStrike(Font2D.java:293)
    at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:77)
    at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
    at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359)
    at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350)
    at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302)
    at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:800)
    at generic.TextPanel.paintComponent(TextPanel.java:26)
    at javax.swing.JComponent.paint(JComponent.java:1054)
    at javax.swing.JComponent.paintChildren(JComponent.java:887)
    at javax.swing.JComponent.paint(JComponent.java:1063)
    at javax.swing.JComponent.paintChildren(JComponent.java:887)
    at javax.swing.JComponent.paint(JComponent.java:1063)
    at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
    at javax.swing.JComponent.paintChildren(JComponent.java:887)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
    at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
    at javax.swing.JComponent.paint(JComponent.java:1040)
    at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
    at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
    at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
    at java.awt.Container.paint(Container.java:1967)
    at java.awt.Window.paint(Window.java:3877)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
    at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
    at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
    at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:711)
    at java.awt.EventQueue.access$000(EventQueue.java:104)
    at java.awt.EventQueue$3.run(EventQueue.java:672)
    at java.awt.EventQueue$3.run(EventQueue.java:670)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:681)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)

热修复吗? 谢谢

1 个答案:

答案 0 :(得分:1)

您应该检查libt2k.so文件,看看它是否真的是您需要的 - 正确的字节序,文件完整性。您可以使用readelf查看详细信息。