title: Long startup delay for Java WebStart application since Java 1.7.0u40
body: <p>Since we installed Java 1.7.0u45 our WebStart application shows a major delay on startup on Windows systems (we haven't tried other platforms).</p>
  
  <p>Symptom is that after double clicking the application icon on the desktop the splash screen shows up quickly, stays for some time (as it did before) and closes.  After this we have a delay of about 1 minute. Then, finally, the application window opens and everything works like a charm.</p>
  
  <p>Our application worked without problems up to Java 1.7.0u25.  Java 1.7.0u40 was the first version where the problem showed up.</p>
  
  <p>Our app is constructed from a single (executable) jar file.  The most exiting part are some native classes for serial port access that are inside the jar. I added the jnlp file at the end of this post.</p>
  
  <p>We tried to find out what the cause of the delay could be:</p>
  
  <p><strong>Checked the Java WebStart release notes</strong> at <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/enhancements-7.html">http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/enhancements-7.html</a> for our versions. </p>
  
  <p>As far we can say, there's nothing that could cause the behaviour.  We noticed that there are new Manifest entries (Permissions, Codebase, Application-Name). These were added.</p>
  
  <p><strong>Looked all over Google and stackoverflow.</strong></p>
  
  <p>Some seem to have a similar problem, but we never saw a solution.  In many cases people have problems with downloading jar files and repeated downloading.  This seems not to be our problem.</p>
  
  <p><strong>Used tough tools</strong></p>
  
  <p>We wanted to know what the app does in the said minute of time.  So we used process explorer and process monitor from sysinternals and wireshark.  We found out that in the waiting time the process tries to communicate via IP with 'vip1.g-anycast1.cachefly.net' (205.234.175.175) and 93.184.220.29.  The latter seems to be a certificate server, I did not really understand what that cachefly thing is.  In both cases we see a TCP syn, but no answer, no further communication. Both adddresses are pingable.</p>
  
  <p>Not related to the IP-stuff: We're sure, that the Application is not downloaded, but started from the cache and that our main is called <em>after</em> the delay, not before.</p>
  
  <p><strong>This is where we are stuck</strong></p>
  
  <p>Any further ideas how to solve this? Are we the only ones experiencing this behaviour?</p>
  
  <p>Jnlp (Note that the urls are manually reworked): </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jnlp  spec="6.0+" codebase="http://53.48.16.33:8180/jenkins/job/TcuTerm%20-%20Deploy/lastSuccessfulBuild/artifact/5000_Construction/5100_Code_Base/TcuTerm/antlocal" &gt;
      &lt;information&gt;
        &lt;title&gt;TcuTerm&lt;/title&gt;
        &lt;vendor&gt;Development&lt;/vendor&gt;
        &lt;icon                 href="http://53.48.16.33:8180/jenkins/job/TcuTerm%20-%20Deploy/lastSuccessfulBuild/artifact/5000_Construction/5100_Code_Base/TcuTerm/src/com/x/tcu/app/term/resources/tcu.jpg"/&gt;
        &lt;icon kind="shortcut" href="http://53.48.16.33:8180/jenkins/job/TcuTerm%20-%20Deploy/lastSuccessfulBuild/artifact/5000_Construction/5100_Code_Base/TcuTerm/src/com/x/tcu/app/term/resources/tcu.jpg"/&gt;
        &lt;icon kind="splash"   href="http://53.48.16.33:8180/jenkins/job/TcuTerm%20-%20Deploy/lastSuccessfulBuild/artifact/5000_Construction/5100_Code_Base/TcuTerm/src/com/x/tcu/app/term/resources/splash.jpg"/&gt;
        &lt;homepage href="https://confluence.detss.corpintra.net/display/TCU/TcuTerm"/&gt;
        &lt;offline-allowed/&gt;
        &lt;shortcut&gt;
          &lt;desktop/&gt;
          &lt;menu submenu="TcuTerm"/&gt;
        &lt;/shortcut&gt;
      &lt;/information&gt;
      &lt;security&gt;
        &lt;all-permissions/&gt;
      &lt;/security&gt;
      &lt;resources&gt;
        &lt;j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/&gt;
        &lt;jar href="TcuTerm.jar" main="true"/&gt;
      &lt;/resources&gt;
      &lt;application-desc main-class="com.x.tcu.app.term.TcuTerminal"/&gt;
      &lt;update check="timeout"/&gt;
   &lt;/jnlp&gt;
  </code></pre>