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: JMF?




On Sep 26, 2008, at 6:53 PM, Greg Guerin wrote:

If you need to know where a loaded class resides, use the Class method:
getProtectionDomain().getCodeSource()


I still prefer mine...

public class Locater extends ClassLoader {

	public static void main(String[] args) {
		if (args.length == 0) {
			System.out.println("Locater: missing class to locate");
			return;
		}
		System.out.println(new Locater().getResource(args[0]));
	}
	
}

I noticed at some point that Apache and/or Ant corrected my spelling and came up with a more elaborate version of their own...
org.apache.tools.ant.launch.Locator


I still like mine better.

Mike Hall        hallmike at att dot net
http://www.geocities.com/mik3hall
http://sourceforge.net/projects/macnative



_______________________________________________
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: JMF? (From: Greg Guerin <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.