btraceio / btrace

BTrace - a safe, dynamic tracing tool for the Java platform
5.82k stars 961 forks source link

Clarify the versions of java which Btrace can target #681

Open SkrrtBacharach opened 8 months ago

SkrrtBacharach commented 8 months ago

I've had some problems trying to trace a binary which runs against jdk17. Is this supported? I'm using the precompiled ZIP release: https://github.com/btraceio/btrace/releases/download/v2.2.4/btrace-v2.2.4-bin.zip

bash-5.2$ JAVA_HOME=/usr/lib/jvm/java-17-openjdk ./btrace/bin/btrace 184 samples/AllMethods.class 
Unable to locate tools.jar. Please, make sure JAVA_HOME points to a valid JDK installation

bash-5.2$ JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk ./btrace/bin/btrace 184 samples/AllMethods.class 
[main] INFO org.openjdk.btrace.client.Main - Attaching BTrace to PID: 184
Unable to open socket file: target process not responding or HotSpot VM not loaded

From reading other issues, this seems like something that is supported, but I can't seem to get it to work. Am I doing something wrong here, or is this just not supported?

jbachorik commented 7 months ago

BTrace needs either 'tools.jar' file or 'jmods' directory under the JAVA_HOME location. Can you check that you have those items there? And JDK 17 is supported, yes.

github-actions[bot] commented 5 months ago

Stale issue message

jbachorik commented 2 weeks ago

BTrace (as of 2.2.6) supports all LTS versions as well as JDK 23 and 24-ea (https://github.com/btraceio/btrace/actions/runs/11759030432?pr=690)