Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the versions of java which Btrace can target #681

Open
SkrrtBacharach opened this issue Mar 31, 2024 · 3 comments
Open

Clarify the versions of java which Btrace can target #681

SkrrtBacharach opened this issue Mar 31, 2024 · 3 comments

Comments

@SkrrtBacharach
Copy link

SkrrtBacharach commented Mar 31, 2024

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?

@SkrrtBacharach SkrrtBacharach changed the title Clarify which versions of java which Btrace can target Clarify the versions of java which Btrace can target Mar 31, 2024
@jbachorik
Copy link
Collaborator

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.

Copy link

github-actions bot commented Jun 2, 2024

Stale issue message

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
@jbachorik jbachorik reopened this Nov 9, 2024
@jbachorik
Copy link
Collaborator

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants