4

Can we use bTrace with JDK5 or lesser versions? If not, what is that things which is provided in JDK6 that makes bTrace work?

My understanding is that btrace working on Java Byte Code Instrumentation which was there for JDK5 as well. is there some extra features of instrumentation which is being exploit by bTrace?

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
Sandeep Jindal
  • 14,510
  • 18
  • 83
  • 121

1 Answers1

3

Please refer here: http://kenai.com/projects/btrace/forums/forum/topics/13112-running-BTrace-on-JRE

Here is what have they answered:

this scenario is not tested. In theory, it should suffice to copy tools.jar to a location picked by the default classpath (or provide BTrace with the classpath containing tools.jar). It would be great if you could test it out - I would love hearing the results.

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
AlexR
  • 114,158
  • 16
  • 130
  • 208
  • 1
    that question was about running BTrace on a Java 6 *JRE* as opposed to a Java 6 JDK. Running it on *Java 5* is probably a bigger change (and I'd guess that it's not done quite as easily). – Joachim Sauer Jul 06 '11 at 12:50
  • 1
    Actually, the topic there was updated with the exact question you ask. In short, BTrace can run only on HotSpot based JVMs, JDK/JRE 6 and newer. JRE 5 lacks the ability to dynamically attach to a running JVM process, load the agent and retransform classes. Additionaly, it requires the agent to be in form of a native library incurring rather big overhead in maintaining multiplatformness :( – JB- Jul 07 '11 at 07:04