JDK-6378314 : Bad warning message when agent library not found. local directory is not searched.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-01-28
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21pFixed 7Fixed hs19Fixed
Description
If you use 'java -agent:unknown' you will get the error message:

    Error occurred during initialization of VM
    Could not find agent library on the library path or in the local directory: unknown

The term 'local directory' is very confusing, the current directory is not searched. I think this 'local directory' is the JDK bin or library directory inside the JDK installation.

I think a shorter message would be better: Could not find agent library: unknown

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/ab3fd720516c
13-08-2010

EVALUATION Thank you Chuck and Jeremy for sending the patch.
13-08-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/ab3fd720516c
11-08-2010

EVALUATION Suggested fix sounds appropriate. This is an easy fix and cuts down on confusion.
08-02-2006

SUGGESTED FIX In file hotspot/src/share/vm/runtime/thread.cpp agent libraries are searched for in the JDK first, then via the platform specific search, if both fails, the user sees: vm_exit_during_initialization("Could not find agent library on the library path or in the local directory", name); I suggest a change like: vm_exit_during_initialization("Could not find agent library", name);
28-01-2006