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: Creating an SPI.



On 2006-01-02, at 15:53, Rams wrote:
wait until Apple has a Java 6 "DP" (or develop on Linux), and use java.util.Service?

  http://download.java.net/jdk6/docs/api/java/util/Service.html

if you're too impatient to wait for Apple, back-port it to Java 5.

Is there any reason I cannot use sun.misc.Service like javax.naming.spi does? After unzipping the src.jar file in java home, that appears to be how the standard java SPI's are locating class names. Once I've got the names, I think I can figure out how to get a classloader to produce an instance for me... I mean, I could read through every jar file in the classpath looking for / META-INF/Service myself, but it seems like a bit of a waste if all I want to do is find the class names and this thing does the trick. Is using a sun.* class a bad idea for any reason?

sun.* classes aren't part of the specification. any given VM may or may not have them. Sun can add/remove/change them arbitrarily at will.


java.util.Service basically *is* sun.misc.Service, but made stable and public. search the bug parade for more information.

--
Elliott Hughes, http://www.jessies.org/~enh/

_______________________________________________
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: Creating an SPI. (From: Rams <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.