views:

43

answers:

3

I have to deploy a Java application via Java Webstart. Webstart downloads the application jar and library jars needed, then after everything was downloaded there is a 50 second delay before the application starts.

Running the jar directly on the computer loads almost instantly, so it's not the application jar which is causing the problem.

I have Java 6 update 22 on the test machine.

Anyone have any ideas on how i could speed things up or what might be causing the problem?

A: 

Are there any virus scanners active on the target machine? If so, try disabling them temporarily. I've found a certain scottish brand of virus scanners to be the cause of similar problems several times...

vwegert
tried on several machines, windows, ubuntu, with and without virus scanners, same problem
johnnyx
A: 

In the Java console you can create multiple thread dumps in this 50 seconds time. It should give you a hint where your application is hanging.

I think it is a name resolution problem on creating some sockets to the server. But without the thread dumps and any idea what your application is doing it is only a look in the crystal ball.

Horcrux7
I checked the java console, java webstart is acting very weird, for all those 50 seconds it keeps on downloading, caching, deleting, saying it can't find then downloading again all the jars, and repeating this over and over till at some point the application starts. I have a hunch it doesnt really like the self-signed security certificate used to sign the jars on the server. It worked pefectly for over 7 months with the same certificate and now this.
johnnyx
Are the jar files saved in the Java cache? You can this in the Java configuration. Also Java print some debug information if it verify a certificate from a jar in the cache. Can you post it here?
Horcrux7
A: 

Problem seems to have been caused by some of the extra library jars i was loading along with the main application jar (allthough all were signed the same). What i forgot to mention in the original question is that the jars were being served each by a php script, not directly from an url to their location on the server. I is still not clear why the issue occured (system has been working like this perfectly for months). I think some issues with security checking in the newer java webstart versions might have triggered it. Linking all the library jars directly in the jnlp and leaving only the main application jar to be served via php script (needed to restrict access to it for clients only), solved the problem. Thank you all for your replies.

johnnyx