Swing application won't work with JavaWebStart 6

Hi,

i have written a Swing application which works fine, but not with JavaWebStart 6.

Wenn i start it from the CMD with the java -jar MyApplication.jar command or with eclipse it works. But when i try to do the same with JWS 6 i get an IOException.

In the .jnlp i have:

<security>

<all-permissions/>

</security>

How can i fix this problem?

I'm thankful for any helpfully information.

nanostructer

[480 byte] By [nanostructera] at [2007-11-27 3:56:27]
# 1

> ..when i try to do the same with JWS 6 i get an IOException.

What is the stacktrace (first 50 lines)?

...> <security>

><all-permissions/>

> </security>

Java 6 does not verify anything but jar's,

what is the rest of this JNLP file?

AndrewThompson64a at 2007-7-12 9:00:40 > top of Java-index,Desktop,Deploying...
# 2

Hi AndrewThompson64 and all the others,

this time i get another Exception.

java.lang.ClassNotFoundException: com.myPackage.Main

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)

at com.sun.javaws.Launcher.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

this is my .jnlp

<?xml version="1.0" encoding="utf-8"?>

<jnlp spec="1.0+" codebase="http://mySite.com:8080/swing/" href="myApp.jnlp">

<information>

<title>My App 1.0</title>

<vendor>Myself</vendor>

<homepage href="http://www.mySite.com" />

<description>Swing App</description>

<offline-allowed />

</information>

<resources>

<j2se version="1.4+" initial-heap-size="128m" max-heap-size ="512m"/>

<jar href="swing/MyApp.jar" />

</resources>

<security>

<all-permissions />

</security>

<application-desc main-class="com.myPackage.Main" />

</jnlp>

But when i try to start the application with the

java -jar MyApp.jar

it works perfectly.

?

What can i do to make the application work with JavaWebStart 6?

cu nanostructer

nanostructera at 2007-7-12 9:00:40 > top of Java-index,Desktop,Deploying...
# 3

I see some suspicious paths in the JNLP..

<?xml version="1.0" encoding="utf-8"?>

<jnlp spec="1.0+" codebase="http://mySite.com:8080/swing/" href="myApp.jnlp">

<information>

<title>My App 1.0</title>

<vendor>Myself</vendor>

<homepage href="http://www.mySite.com" />

<description>Swing App</description>

<offline-allowed />

</information>

<resources>

<j2se version="1.4+" initial-heap-size="128m" max-heap-size ="512m"/>

<jar href="swing/MyApp.jar" />

...

Given the codebase ..

http://mySite.com:8080/swing/

..this element suggests the jar

should be located here..

http://mySite.com:8080/swing/swing/MyApp.jar

Is the jar located there, or is it really at..

http://mySite.com:8080/swing/MyApp.jar ?

If the latter, try changing the jar element to..

<jar href="MyApp.jar" />

AndrewThompson64a at 2007-7-12 9:00:40 > top of Java-index,Desktop,Deploying...
# 4

Hi

i had finished this project few months ago, but now i have to find out why it isn't working with JWS 6.

The ClassNotFoundException was because i used an old .jnlp (blush)

After corection it works and i get the previous Exception.

When i start the application from the cmd or eclipse it works fine. I didn't find a better way to

print the stacktrace:

e = exception

IOException (e.getMessage) java.lang.NullPointerException

IOException (e.getCause) java.lang.NullPointerException

IOException (e.toString) javax.net.ssl.SSLException: java.lang.NullPointerException

IOException (e.getLocalizedMessage) java.lang.NullPointerException

IOException (e.fillInStackTrace) javax.net.ssl.SSLException: java.lang.NullPointerException

ste = StackTraceElement

IOException (ste.toString) com.myPackage.App2ServRequester.login(App2ServRequester.java:204)

IOException (ste.toString) com.myPackage.LoginPanel.login(LoginPanel.java:108)

IOException (ste.toString) com.myPackage.LoginPanel.jpf_pw_actionPerformed(LoginPanel.java:155)

IOException (ste.toString) com.myPackage.LoginPanel.access$0(LoginPanel.java:154)

IOException (ste.toString) com.myPackage.LoginPanel$1.actionPerformed(LoginPanel.java:64)

IOException (ste.toString) javax.swing.JTextField.fireActionPerformed(Unknown Source)

IOException (ste.toString) javax.swing.JTextField.postActionEvent(Unknown Source)

IOException (ste.toString) javax.swing.JTextField$NotifyAction.actionPerformed(Unknown Source)

IOException (ste.toString) javax.swing.SwingUtilities.notifyAction(Unknown Source)

IOException (ste.toString) javax.swing.JComponent.processKeyBinding(Unknown Source)

IOException (ste.toString) javax.swing.JComponent.processKeyBindings(Unknown Source)

IOException (ste.toString) javax.swing.JComponent.processKeyEvent(Unknown Source)

IOException (ste.toString) java.awt.Component.processEvent(Unknown Source)

IOException (ste.toString) java.awt.Container.processEvent(Unknown Source)

IOException (ste.toString) java.awt.Component.dispatchEventImpl(Unknown Source)

IOException (ste.toString) java.awt.Container.dispatchEventImpl(Unknown Source)

IOException (ste.toString) java.awt.Component.dispatchEvent(Unknown Source)

IOException (ste.toString) java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)

IOException (ste.toString) java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)

IOException (ste.toString) java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)

IOException (ste.toString) java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)

IOException (ste.toString) java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)

IOException (ste.toString) java.awt.Component.dispatchEventImpl(Unknown Source)

IOException (ste.toString) java.awt.Container.dispatchEventImpl(Unknown Source)

IOException (ste.toString) java.awt.Window.dispatchEventImpl(Unknown Source)

IOException (ste.toString) java.awt.Component.dispatchEvent(Unknown Source)

IOException (ste.toString) java.awt.EventQueue.dispatchEvent(Unknown Source)

IOException (ste.toString) java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

IOException (ste.toString) java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

IOException (ste.toString) java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

IOException (ste.toString) java.awt.Dialog$1.run(Unknown Source)

IOException (ste.toString) java.awt.event.InvocationEvent.dispatch(Unknown Source)

IOException (ste.toString) java.awt.EventQueue.dispatchEvent(Unknown Source)

IOException (ste.toString) java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

IOException (ste.toString) java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

IOException (ste.toString) java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

IOException (ste.toString) java.awt.EventDispatchThread.pumpEvents(Unknown Source)

IOException (ste.toString) java.awt.EventDispatchThread.pumpEvents(Unknown Source)

IOException (ste.toString) java.awt.EventDispatchThread.run(Unknown Source)

cu nanostructer

nanostructera at 2007-7-12 9:00:40 > top of Java-index,Desktop,Deploying...
# 5
Hi, it looks like an SSLException :)I use ssl but i use it with an "always trust manager" and it works under Java 5 and cmd, eclipse ...I don't know what's happened :(cu nanostructer
nanostructera at 2007-7-12 9:00:40 > top of Java-index,Desktop,Deploying...
# 6
Hi *, i didn't found any way to solve this problem :(But i found a way how to make it work :)I just point to the .jar directly without using .jnlp.cu nanostructer
nanostructera at 2007-7-12 9:00:40 > top of Java-index,Desktop,Deploying...