[Bug 3351] Java applet with "." codebase launched via jnlp web-start cannot load. Fails because NON-MAIN classes do not load

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Fri Apr 7 13:26:27 UTC 2017


--- Comment #2 from stefan at kemtrak.com ---
Hi, I'll break you the good news first, we have the code working!!
Still some warnings in the terminal window but it runs at least.
See below

(In reply to JiriVanek from comment #1)
> Hi!
> looking to it. The Kemtrak does:
> localObject3 = (java.net.JarURLConnection)localURL.openConnection();
>           java.util.jar.JarFile localJarFile =
> ((java.net.JarURLConnection)localObject3).getJarFile();
>           str9 = localJarFile.getName();
>           i3 = localJarFile.size();
>           localJarFile.close();
> ...
>           org.freixas.jcalendar.JCalendarCombo localJCalendarCombo = new
> org.freixas.jcalendar.JCalendarCombo(java.util.Calendar.getInstance(),
> Locale.getDefault(), 1, true, "HH:mm:ss");
> Do you mind to try  to remove            localJarFile.close(); ?

This is line 900, a part where I open a tentative connection to the jar file
just to see if it exists (error control in case it is not there). Connection
is/was closed in the end as it is not used anywhere (I thought it was good
practice to close the connection when finished). After code confirms file
exists, class is loaded on Line 915 (and it was giving the exception there).

As soon as I comment away line 900, whole code starts working!!!
Wow, that was an impressive catch you made.

> Anyway this is interesting issue. If my bet is correct, then itw needs soem
> fix, of mayb java's JarURLConnection needs some fix. (first is more
> appropriate).

I am just thinking here: If it was Java's JarURLConnection problem, wouldn't
that mean that the applet would fail in other implementations as well ?(which
it does not).

In any case the code with the localJarFile.close(); commented away is in the
usual place and you can see it running now :)

Still some warning messages come up in the console but they are not "fatal"

> In all cases the fix will not be easy.

Should I leave the code with that line commented away? Is it OK if I do *not*
close that connection? I closed the connection after using it because I thought
it was good practice. And because Java does not complain, except on the IcedTea
case, the code has been running like that for years now. Would it create any
problems leaving the connection open? Or it closes when the applet exits?


You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20170407/83098328/attachment.html>

More information about the distro-pkg-dev mailing list