DEV Community

Query Filter
Query Filter

Posted on

bridge22

@echo off
set PID=%1
:: Find your JDK path (ensure this points to the JDK, not just the JRE)
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_321
set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar

:: Run with tools.jar on the classpath
java -cp "profiler-all-in-one-all.jar;%TOOLS_JAR%" comet.agent.UniversalAttacher %PID%

========


. Update UniversalAttacher.java (Optional but recommended)
ByteBuddy sometimes needs a "hint" to prefer the native provider. You can add this line at the very beginning of your main method in UniversalAttacher.java:

Java

public static void main(String[] args) {
    // Force ByteBuddy to look for the JDK's native attachment provider first
    System.setProperty("comet.shaded.bytebuddy.agent.attacher.native", "true");

    // ... rest of your code
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)