问题
When running the VisualVM profiler, it gives this error in the console of the program being run:
objc[1145]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Profiler Agent: Waiting for connection on port 5140 (Protocol version: 15)
Profiler Agent: Established connection with the tool
Profiler Agent: Local accelerated session
What does it mean and how do I fix it? The profiler does still give a result but I want to make sure everything working correctly as it's hard to use common sense to know if the result given is right.
回答1:
This is problem in JDK, not in VisualVM. There is no negative impact from this problem since both copies of that class JavaLaunchHelper are identical (compiled from the exact same source). It is purely a cosmetic issue.
来源:https://stackoverflow.com/questions/25455698/visualvm-profiler-error-class-javalaunchhelper-is-implemented-in-both-bin-ja