I don't know wether this is still of interest, but I found these two 
papers guite illuminating:

[Gon98] Li Gong. Secure java class loading. In IEEE Internet Computing, 
volume 2, 1998.

[LB98] Sheng Ling and Gilad Bracha. Dynamic class loading in the java 
virtual machine. In Proceedings OOPSLA 98, 1998.

Andreas

Andrew Smallbone wrote:
>>AFAIK, it is not possible to modify core Java classes
>>(not without cheating anyway). 
> 
> 
> OK, if I did cheat (by replacing the system class loader?)
> would it be possible? ie add instructions around a native method?
> 
> I want to make sure that _every_ call to System.currentTimeMillis()
> runs our extra code - including our code, 3rd party libraries, and
> system code.  Wouldn't scanning classses for calls to the method also
> have the same problem with trying to modify system classes that call
> currentTimeMillis().
> 
> Thanks again
> Andrew
> 
> 
>>You can, however, modify all other classes. For example,
>>scan the classes for calls to invokestatic
>>System.currentTimeMillis (very easy with BCEL), and
>>replace them with invokestatic <your_class.your_method>.
>>This simple replacement (as opposed to adding the code
>>inline) would be your best bet, as it shouldn't require
>>any other changes.
>>You can do this ahead of time, or at run time with your
>>own ClassLoader.
>>
>>
>>------------------------------------------------------------------------
>>
>>--
>>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 

-- 
Andreas Schlapbach      [EMAIL PROTECTED]
http://www.iam.unibe.ch/~schlpbch



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to