j.l.instrument does require a load-time agent specified on the command-line
(figuratively speaking; if you wrote your own custom launcher, you could
provide the necessary system property directly to the JNI Invocation code).
Your agent implements the Instrumentation interface, and the actual class
name is passed on the command-line, and then your instrumenter is called as
classes are loaded (after a core bootstrap set is in place--Object, String,
Class, etc).

Ted Neward
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
http://www.tedneward.com
 

> -----Original Message-----
> From: [email protected] [mailto:jvm-
> [EMAIL PROTECTED] On Behalf Of Patrick Wright
> Sent: Thursday, January 31, 2008 3:04 AM
> To: [email protected]
> Subject: [jvm-l] Re: Ability to force class unloading in JDK 6 Update
> 4?
> 
> 
> > it's a 1.6 feature:
> >
> http://download.java.net/jdk7/docs/api/java/lang/instrument/Instrumenta
> tion.html#retransformClasses(java.lang.Class...)
> 
> I think I recall there are some limitations--you either have to
> specify an agent on the command line, or else "An implementation may
> provide a mechanism to start agents sometime after the the VM has
> started. The details as to how this is initiated are implementation
> specific but typically the application has already started and its
> main method has already been invoked. "
> (http://download.java.net/jdk7/docs/api/java/lang/instrument/package-
> summary.html).
> 
> 
> Patrick
> 
> > 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.19.16/1251 - Release Date:
> 1/30/2008 9:29 AM
> 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.19/1256 - Release Date: 2/2/2008
1:50 PM
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to