I am trying to write a JVM TI sample agent on Mac OS X. I have Java 5 installed. I want to know against which dynamic library should I link my sample agent code?

有帮助吗?

解决方案

There's no need to link against anything.

gcc -I/path/to/java/include -shared -fPIC -o libagent.so agent.c

其他提示

It's libjvm.so on Linux, so I suspect something similar on the Mac.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top