Множественная проблема JVM в приложении

У нас есть настольное приложение, в которое мы упаковываем Application Jar и JRE, чтобы избежать зависимости Java на компьютере клиента.

Но проблема в том, что у клиента уже установлена ​​Java. Machine. Мы сталкиваемся с проблемой, как отсутствие определения класса из-за зависимостей версии Java для некоторого класса.

Теперь мой вопрос заключается в том, как всегда запускать приложение с JRE, которые упакованы с Application, и гарантировать, что оно не использует System JRE, если оно установлено.

C:\Users\User\Nokia\1830 PSS-APA>jre\bin\java -jar apat.jar
Exception in thread "ApaPowerControlChart" java.lang.NoClassDefFoundError: Could
 not initialize class sun.font.SunFontManager
        at sun.font.FontDesignMetrics.getMetrics(Unknown Source)
        at sun.swing.SwingUtilities2.getFontMetrics(Unknown Source)
        at javax.swing.JComponent.getFontMetrics(Unknown Source)
        at javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.GridLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at javax.swing.JRootPane$RootLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at java.awt.Window.pack(Unknown Source)
        at com.nokia.APA.Chart.ApaPowerControlChart.display(Unknown Source)
        at com.nokia.APA.Chart.ApaPowerControlChart$1.run(Unknown Source)
Exception in thread "ApaPowerControlChart" java.lang.NoClassDefFoundError: Could
 not initialize class sun.font.SunFontManager
        at sun.font.FontDesignMetrics.getMetrics(Unknown Source)
        at sun.swing.SwingUtilities2.getFontMetrics(Unknown Source)
        at javax.swing.JComponent.getFontMetrics(Unknown Source)
        at javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.GridLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at javax.swing.JRootPane$RootLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at java.awt.Window.pack(Unknown Source)
        at com.nokia.APA.Chart.ApaPowerControlChart.display(Unknown Source)
        at com.nokia.APA.Chart.ApaPowerControlChart$1.run(Unknown Source)
Exception in thread "ApaPerformanceChart" java.lang.NoClassDefFoundError: Could
not initialize class sun.font.SunFontManager
        at sun.font.FontDesignMetrics.getMetrics(Unknown Source)
        at sun.swing.SwingUtilities2.getFontMetrics(Unknown Source)
        at javax.swing.JComponent.getFontMetrics(Unknown Source)
        at javax.swing.plaf.basic.BasicTabbedPaneUI.getFontMetrics(Unknown Sourc
e)
        at javax.swing.plaf.basic.BasicTabbedPaneUI.calculateMaxTabWidth(Unknown
 Source)
        at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateSi
ze(Unknown Source)
        at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.preferredLa
youtSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at javax.swing.JRootPane$RootLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at java.awt.Window.pack(Unknown Source)
        at com.nokia.APA.Chart.ApaPerformanceChart.display(Unknown Source)
        at com.nokia.APA.Chart.ApaPerformanceChart$1.run(Unknown Source)
Exception in thread "ApaChannelTuningChart" java.lang.NoClassDefFoundError: Coul
d not initialize class sun.font.SunFontManager
        at sun.font.FontDesignMetrics.getMetrics(Unknown Source)
        at sun.swing.SwingUtilities2.getFontMetrics(Unknown Source)
        at javax.swing.JComponent.getFontMetrics(Unknown Source)
        at javax.swing.plaf.basic.BasicTabbedPaneUI.getFontMetrics(Unknown Sourc
e)
        at javax.swing.plaf.basic.BasicTabbedPaneUI.calculateMaxTabWidth(Unknown
 Source)
        at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateSi
ze(Unknown Source)
        at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.preferredLa
youtSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at javax.swing.JRootPane$RootLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at javax.swing.JComponent.getPreferredSize(Unknown Source)
        at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
        at java.awt.Container.preferredSize(Unknown Source)
        at java.awt.Container.getPreferredSize(Unknown Source)
        at java.awt.Window.pack(Unknown Source)
        at com.nokia.APA.Chart.ApaChannelTuningChart.display(Unknown Source)

0 ответов

Другие вопросы по тегам