commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McGuinness <r...@fallingonline.com>
Subject Re: Betwixt : Class Loader - Food for thought
Date Mon, 21 Nov 2005 23:56:04 GMT
It would appear that way, but this is exactly what happens when you  
load a properties file.
And that method works across all JVMs and JDKs.

Cheers,
Ryan

On Nov 20, 2005, at 12:07 PM, Thomas Dudziak wrote:

> On 11/20/05, Ryan McGuinness <ryan@fallingonline.com> wrote:
>> I have been trying to get betwixt running with the IBM JDK within
>> WebSphere. While sifting through the source, I noticed that each
>> class that deals with loading classes does something a little
>> different. Should there be a Utility class to handle this.
>
> +1
>
>> Also, in more secure containers, it may be a good idea to get the
>> class loader a little differently:
>> Below is a code snip-it on getting the loader through the Security
>> Manager.
>
> why so complicated ? Wouldn't it suffice to first check the context
> class loader at the current thread
>
> Thread.currentThread().getContextClassLoader()
>
> is available, and if not, then using the one that loaded the  
> current class
>
> getClass().getClassLoader()
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message