开发者

java webstart extremely slow

开发者 https://www.devze.com 2023-01-20 20:51 出处:网络
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 applic

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 o开发者_开发技巧n 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?


I see this 50 seconds too. After many debug lines I entered into my code I noticed, that tasks like class loading or access to IO (save file) are the cause, but anywhere I bypass, i see these 50 seconds moving to the next step.

Currently don't have resolution for that problem. I am using Java 6 update 31 and those external jars: Java FX, JXTA, JMF. Non ot them seems to be directly related with the problem.


I may be wrong and it's hard to say without saying a full tracing and debug log for your startup, but this could be due to the certificate verification process.

Try disabled some of them in the Java Control Panel and see how things go (not saying you should, just saying that would be the explanation for your delay, and that you should just accept it).


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...


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.


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.


When I self-signed my jars I noticed that there was a warning that the certificate would expire in 6 months. That fits in with the symptom of working fine (for maybe 6 months?) and then choking.

0

精彩评论

暂无评论...
验证码 换一张
取 消