简体   繁体   中英

Running the custom Debugger JAVA

I am trying to run the custom debugger agent which is written in C++ using the JVMTI interface. I followed the following link

Creating a Debugging and Profiling Agent with JVMTI

I am trying to run the debugger which is present in the demo folder of jdk, using the following command java -Xbootclasspath/a:mtrace.jar -agentlib:mtrace the jvm is not booting up it's giving me the following output

Error occurred during initialization of VM
Could not find agent library mtrace on the library path, with error: Can't find dependent libraries

i have added the folder containing the library file to the PATH variable, still no luck, what is the issue here ?

You can use -agentpath:/path/to/mtrace (The absolute path) to locate the agent library. The PATH environment variable only provides path to the terminal commands. Native agent library path has to be set using -agentpath runtime flag.

With -agentpath you don't have to use -agentlib switch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM