commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Keyes <j...@mac.com>
Subject Re: [Math] common-math and bloated 3rd party libraries
Date Tue, 18 Nov 2003 15:24:15 GMT
I only came across JRat[1] yesterday evening.  I haven't experimented
with it yet but its on my todo list.

-John K

[1] http://jrat.sourceforge.net

On 17 Nov 2003, at 18:04, Mark R. Diggory wrote:

> Very true, but are there any Open Source projects or initiatives to 
> standardize this sort of approach already? For example, here is a 
> project, I'm not sure of its current state (is about a year since 
> anything was done to it).
>
> http://jiapi.sourceforge.net/
>
> Also, does JMX relate at all to this use case?
>
> http://java.sun.com/products/JavaManagement/
>
> In other words is there any sort of "standardized" approach to 
> managing runtime event debugging in Java?
>
> -Mark
>
>
> Inger, Matthew wrote:
>
>> Not really a runtime dependency.  You would merely use
>> a class loader which would have BCEL instrument your code.
>> Your code would have have no clue about anything that's
>> being done to it, and you could easily write your code
>> generically enough to plug in an arbitrary classloader.
>> Here's a main program which replaces the classloader,
>> and calls another main program.  Think of it as a wrapper
>> script.
>>     public static void main(String[] args)
>>         throws Exception
>>     {
>>         // This is where you would construct your class loader
>>         // Done generically enough, you could specify a classloader
>>         // on the command line, and construct it here using 
>> reflection.
>>         ClassLoader myClassLoader =
>>                 Thread.currentThread().getContextClassLoader();
>>         final int realClassNameIndex = 0;
>>         String realClassName = args[realClassNameIndex];
>>         int realArgsLength = args.length - realClassNameIndex - 1;
>>         String realClassArgs [] = new String[realArgsLength];
>>         System.arraycopy(args, realClassNameIndex + 1,
>>                          realClassArgs, 0,
>>                          realArgsLength);
>>         Class clazz = myClassLoader.loadClass(realClassName);
>>         Method m = clazz.getDeclaredMethod("main",
>>                 new Class[] { args.getClass() });
>>         m.invoke(null, new Object[] { realClassArgs });
>>     }
>> -----Original Message-----
>> From: Tomasz Pik [mailto:pikus@ais.pl]
>> Sent: Monday, November 17, 2003 12:03 PM
>> To: Jakarta Commons Developers List
>> Subject: Re: [Math] common-math and bloated 3rd party libraries
>> Mark R. Diggory wrote:
>>> I know there were a means to setup logging for debugging without 
>>> actually having to bury your code in logging lines... I've actually 
>>> seen packages like BCEL used to transform the classes in such a way 
>>> as to "inject" logging lines into bytecode, its a pretty slick idea, 
>>> but also has the overhead of learning how to use BCEL to manipulate 
>>> the bytecode base without screwing with the actual algorithm 
>>> behavior.
>> AspectJ?
>> But it introduces another runtime dependency...
>> Tomek
>>> -Mark
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
> -- 
> Mark Diggory
> Software Developer
> Harvard MIT Data Center
> http://osprey.hmdc.harvard.edu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


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


Mime
View raw message