United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6378314 Bad warning message when agent library not found. local directory is not searched.
JDK-6378314 : Bad warning message when agent library not found. local directory is not searched.

Details
Type:
Bug
Submit Date:
2006-01-28
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic
Sub-Component:
jvmti
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs19 (b06)

Related Reports
Backport:
Backport:
Backport:
Backport:

Sub Tasks

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
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);
                                     
2006-01-28
EVALUATION

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

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

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

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



Hardware and Software, Engineered to Work Together