Мне нужна помощь при запуске моей программы с Java Web Start.
Я запускаю свою программу с домашней страницы, программа просто зависает с помощью javaw-процесса в обработчике процесса. Когда я сбрасываю потоки, используя jvisualvm, я вижу, что он завис в потоке "AWT-EventQueue-0" (при создании моего JFrame):
"AWT-EventQueue-0" prio=6 tid=0x02da7c00 nid=0x1414 runnable [0x0367f000]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.getScreenInsets(Native Method)
at sun.awt.windows.WToolkit.getScreenInsets(Unknown Source)
at java.awt.Window.init(Unknown Source)
at java.awt.Window.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at javax.swing.JFrame.<init>(Unknown Source)
at se.testing.Application$2.run(Application.java:170)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
Вот как выглядит главное:
public static void main(String... args) {
....
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame f = new JFrame("Test");
...
}
});
}
Обновление : А вот файл jnlp:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="6.0+"
codebase="http://localhost/archive/Application-1.0.0/"
href="application.jnlp">
<information>
<title>Application</title>
<vendor>Testing</vendor>
<homepage href="http://localhost/" />
<description></description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<update check="timeout" policy="always" />
<resources>
<j2se version="1.6+"/>
<jar href="Application-1.0.0.jar" main="true"/>
<jar href="Framework-1.0.0.jar"/>
<jar href="WebServices-1.0.0.jar"/>
<jar href="axis-1.4.jar"/>
<jar href="axis-jaxrpc-1.4.jar"/>
<jar href="log4j-1.2.14.jar"/>
<jar href="spring-2.5.5.jar"/>
<jar href="commons-logging-1.1.1.jar"/>
<jar href="commons-net-2.0.jar"/>
<jar href="nanoxml-2.2.3.jar"/>
<jar href="jtds-1.2.2.jar"/>
<jar href="commons-discovery-0.4.jar"/>
<jar href="wsdl4j-1.6.2.jar"/>
</resources>
<application-desc main-class="se.testing.Application">
</application-desc>
</jnlp>
Что может быть не так?!
(Это первое место, где я касаюсь графического интерфейса и работаю в Windows XP.)
Также я заметил, что у меня есть другой поток AWT (??!?!), Также висящий в разных местах:
С первого запуска я получил его, чтобы повесить здесь:
"AWT-EventQueue-1" prio=6 tid=0x03448800 nid=0x152c runnable [0x036cf000]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WComponentPeer.nativeHandleEvent(Native Method)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at sun.awt.windows.WWindowPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.SequencedEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
А из прогона 2:
"AWT-EventQueue-1" prio=6 tid=0x03448800 nid=0x1638 runnable [0x036cf000]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.isWindowTranslucencySupported(Native Method)
at com.sun.awt.AWTUtilities.isWindowTranslucencySupported(Unknown Source)
at com.sun.awt.AWTUtilities.isTranslucencySupported(Unknown Source)
at javax.swing.RepaintManager.updateWindows(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)