2

Hey guys i have a big doubt which i noticed today in my developed java swing app..

The problem where i found is launch()

When i try my developed app locally it runs without any delay but when i try this from my web server using jnlp i find that there is a 5 seconds delay in executing the next line...

When i did a deep research on it i found that the launch() function in the main class file takes 5 seconds after that it starts executing the startup() function.. is there any updates need to be made...? and how to reduce the delay...?

im using java 1.6 and netbeans

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
Dinesh Ravichandran
  • 312
  • 1
  • 5
  • 16
  • I've never heard of the launch() method. Is it your method or a method internal to jnlp? – Hovercraft Full Of Eels Apr 11 '12 at 15:24
  • not it is not my custom method... i believe it is used in any of theses library files appframework-1.0.3.jar or swing-worker-1.1.jar because when creating a new java desktop application in netbeans a default library will be added called "Swing Application Framework" and the above 2 library files are the Swing Application Framework... if required ill create a new test project using nb and send you the project zip... – Dinesh Ravichandran Apr 11 '12 at 15:32
  • Please check this link: https://docs.google.com/viewer?a=v&q=cache:rSXEPJkYLYIJ:www.jgoodies.com/articles/jsr296.pdf+&hl=en&gl=in&pid=bl&srcid=ADGEESgHLPvf8M-u5OWCvlL6CxHbLqcPNGtdDZOvxa77KCxU0CDMPdXz7Pq_fX9qfpUqmj0gSAQNUoUIkYJzaMYnrodPC7SOj1OeP4ihJc1icKz68uUxZueI1AvPVAtYlG6_Qfa_s8V2&sig=AHIEtbRU73AhUkfGe6bc2cywPmtPUhnohg&pli=1 – Dinesh Ravichandran Apr 11 '12 at 15:36
  • I just read a line saying [Was] intended for Java 7, had you tried it with Java 7 yet, might be, they must have done something, if there is any such issue. – nIcE cOw Apr 11 '12 at 15:54

1 Answers1

1
The thread executing within the Runnable object sleeps for 5 seconds   
to simulate a long read over a slow network connection

I know that this is implemented for some cases, but it may be in your case as well!
If this is true in your case, then I can see that this is inevitable and can't be changed.
You can find it in here

GingerHead
  • 8,130
  • 15
  • 59
  • 93
  • I removed all the functions and class files which made it to be slow and everything works fine except one thing... "ResourceBundle" which takes 4 seconds to read a language property file... is there any alternate for this...? – Dinesh Ravichandran Apr 14 '12 at 19:26