Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java-dev Digest, Vol 5, Issue 350



(A sign that I'm not enjoying work at the moment).

It seems that deployment has undergone some refactoring here.  Some changes from Java 6 seems to have been backported to Java 5.  Some diffs between old and new.

JNLPCachedJarURLConnection has been added. 
JNLPURLStreamHandler has been added.
JNLPClassLoader#findResource(String) has changed.  The streamhandler is different in the returned URL.  I suspect it is up to something similar to Java 6.

You can work around this with judicious use of reflection and platform-version-dependent code paths.  I'm sure if you run a test case such as:

URL u = MyTestClass.class.getClassLoader.findResource("resourceToFind");

breakpoint after the variable assignment takes place and do debug inspection on the return URL's private parts.

Good Luck.

Brendon.

On 25 Sep 2008, at 15:57, Emmanuel Puybaret wrote:

Hi,

Thank you Brendon

Are you 100% sure you loaded the JNLP with Java 5?  Because the Web
Start class loader changed from which class it inherits in Java 6.  In
Java 6, it's not possible to easily get a reference to the JAR file
from which a resource is loaded (it returns a URL to the original web
site instead).

As noticed in my first message, I'm sure it doesn't work on a MacBook Core Duo and an Imac G5. Anyway, Java 6 doesn't exist on these machines and you can check the Java version in use with About dialog in Sweet Home 3D ! ;-)

Also, JNLPCachedJarURLConnection is only available in Java 6.  I
suspect you'll run into this problem on all platforms using Java 6.  I
did.  I have a terrible hack to get around this (setAccessible(true)
to get the underlying files).

I was so astonished by your comment that I tested it again on my MacBook, and yes, the class used to handle URL is JNLPCachedJarURLConnection !!! Hum, Apple, this is probably a serious hint to help you fix this bug. Please, consider removing this Java update from server. This seems to be a serious regression.
By the way, Sweet Home 3D works with Java 6 under Windows and Linux.

Best regards
--
Emmanuel PUYBARET
Email  : email@hidden
Web    : http://www.eteks.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Java-dev Digest, Vol 5, Issue 350 (From: Emmanuel Puybaret <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.