You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Andrew Zhang <zh...@gmail.com> on 2007/10/11 02:26:54 UTC

[M3] Failed to open agent library jdwp.dll when debugging a java application

Hi all,

I met another problem on another machine. This one looks much easier:

Failed to open agent library jdwp.dll : 找不到指定的模块。  (Can not find the
specified module)

Failed to open agent library jdwp.dll

Failed to initialize JVMTI.

Scenario:  Just run debug of following code

public static void main(String[] args) {
        for (int i = 0; i < 100; ++i) {
            ++i;
            System.out.println(i);
        }
    }

Platform info:

OS: Microsoft Windows XP Home Edition Version 2002 Service Pack 2
Eclipse: version 3.3.0

jdwp.dll does exist under jre\bin

What might be wrong? Thanks!


-- 
Best regards,
Andrew Zhang

http://zhanghuangzhu.blogspot.com/

Re: [M3] Failed to open agent library jdwp.dll when debugging a java application

Posted by Andrew Zhang <zh...@gmail.com>.
On 10/11/07, Tim Ellison <t....@gmail.com> wrote:
>
> Andrew Zhang wrote:
> > On 10/11/07, Alexei Fedotov <al...@gmail.com> wrote:
> >> Hi Andrew,
> >> Are you using federated build?
> >>
> >> When people build classlib and drlvm separately, they don't get
> >> jdwp.dll since it is built from jdktools module. One may use federated
> >> build (ant -Dauto.fetch=true) or build the module jdktools
> >> (worling_jdktools) and copy the dynamic libraries manually.
> >
> > Thanks Alexei!
> >
> > Yes, I downloaded M3 from our website, using harmony-hdk-580985\jdk\jre
> as
> > the jre path in "Installed JREs". jdwp.dll does exist under jdk\jre\bin.
> Any
> > other possible reason?
>
> Possible that the DLL's dependencies are missing so it won't load.
> Having said that I just looked at jdwp.dll on my system and the only
> dependencies appear to be kernel32.dll, msvcp71.dll, and msvcr71.dll.


Thanks Tim,

You found the problem!  msvcp71.dll does not exist under
harmony-hdk-580985\jdk\jre\bin.

Is there any special reason? After I downloaded msvcp71.dll and put it into
the folder, debugger works fine!

Regards,
> Tim
>



-- 
Best regards,
Andrew Zhang

http://zhanghuangzhu.blogspot.com/

Re: [M3] Failed to open agent library jdwp.dll when debugging a java application

Posted by Alexey Varlamov <al...@gmail.com>.
2007/10/11, Tim Ellison <t....@gmail.com>:
> Andrew Zhang wrote:
> > On 10/11/07, Alexei Fedotov <al...@gmail.com> wrote:
> >> Hi Andrew,
> >> Are you using federated build?
> >>
> >> When people build classlib and drlvm separately, they don't get
> >> jdwp.dll since it is built from jdktools module. One may use federated
> >> build (ant -Dauto.fetch=true) or build the module jdktools
> >> (worling_jdktools) and copy the dynamic libraries manually.
> >
> > Thanks Alexei!
> >
> > Yes, I downloaded M3 from our website, using harmony-hdk-580985\jdk\jre as
> > the jre path in "Installed JREs". jdwp.dll does exist under jdk\jre\bin. Any
> > other possible reason?
>
> Possible that the DLL's dependencies are missing so it won't load.
> Having said that I just looked at jdwp.dll on my system and the only
> dependencies appear to be kernel32.dll, msvcp71.dll, and msvcr71.dll.

Another reason could be cleared "read&execute" permission for the dll,
this happens e.g. if a dll is unzipped with cygwin's unzip utility.

>
> Regards,
> Tim
>

Re: [M3] Failed to open agent library jdwp.dll when debugging a java application

Posted by Tim Ellison <t....@gmail.com>.
Andrew Zhang wrote:
> On 10/11/07, Alexei Fedotov <al...@gmail.com> wrote:
>> Hi Andrew,
>> Are you using federated build?
>>
>> When people build classlib and drlvm separately, they don't get
>> jdwp.dll since it is built from jdktools module. One may use federated
>> build (ant -Dauto.fetch=true) or build the module jdktools
>> (worling_jdktools) and copy the dynamic libraries manually.
> 
> Thanks Alexei!
> 
> Yes, I downloaded M3 from our website, using harmony-hdk-580985\jdk\jre as
> the jre path in "Installed JREs". jdwp.dll does exist under jdk\jre\bin. Any
> other possible reason?

Possible that the DLL's dependencies are missing so it won't load.
Having said that I just looked at jdwp.dll on my system and the only
dependencies appear to be kernel32.dll, msvcp71.dll, and msvcr71.dll.

Regards,
Tim

Re: [M3] Failed to open agent library jdwp.dll when debugging a java application

Posted by Andrew Zhang <zh...@gmail.com>.
On 10/11/07, Alexei Fedotov <al...@gmail.com> wrote:
>
> Hi Andrew,
> Are you using federated build?
>
> When people build classlib and drlvm separately, they don't get
> jdwp.dll since it is built from jdktools module. One may use federated
> build (ant -Dauto.fetch=true) or build the module jdktools
> (worling_jdktools) and copy the dynamic libraries manually.


Thanks Alexei!

Yes, I downloaded M3 from our website, using harmony-hdk-580985\jdk\jre as
the jre path in "Installed JREs". jdwp.dll does exist under jdk\jre\bin. Any
other possible reason?

Hope, this helps.
>
> With best regards, Alexei
>
> On 10/11/07, Andrew Zhang <zh...@gmail.com> wrote:
> > Hi all,
> >
> > I met another problem on another machine. This one looks much easier:
> >
> > Failed to open agent library jdwp.dll : 找不到指定的模块。  (Can not find the
> > specified module)
> >
> > Failed to open agent library jdwp.dll
> >
> > Failed to initialize JVMTI.
> >
> > Scenario:  Just run debug of following code
> >
> > public static void main(String[] args) {
> >        for (int i = 0; i < 100; ++i) {
> >            ++i;
> >            System.out.println(i);
> >        }
> >    }
> >
> > Platform info:
> >
> > OS: Microsoft Windows XP Home Edition Version 2002 Service Pack 2
> > Eclipse: version 3.3.0
> >
> > jdwp.dll does exist under jre\bin
> >
> > What might be wrong? Thanks!
> >
> >
> > --
> > Best regards,
> > Andrew Zhang
> >
> > http://zhanghuangzhu.blogspot.com/
> >
>
>
> --
> With best regards,
> Alexei,
> ESSD, Intel
>



-- 
Best regards,
Andrew Zhang

http://zhanghuangzhu.blogspot.com/

Re: [M3] Failed to open agent library jdwp.dll when debugging a java application

Posted by Alexei Fedotov <al...@gmail.com>.
Hi Andrew,
Are you using federated build?

When people build classlib and drlvm separately, they don't get
jdwp.dll since it is built from jdktools module. One may use federated
build (ant -Dauto.fetch=true) or build the module jdktools
(worling_jdktools) and copy the dynamic libraries manually.

Hope, this helps.

With best regards, Alexei

On 10/11/07, Andrew Zhang <zh...@gmail.com> wrote:
> Hi all,
>
> I met another problem on another machine. This one looks much easier:
>
> Failed to open agent library jdwp.dll : 找不到指定的模块。  (Can not find the
> specified module)
>
> Failed to open agent library jdwp.dll
>
> Failed to initialize JVMTI.
>
> Scenario:  Just run debug of following code
>
> public static void main(String[] args) {
>        for (int i = 0; i < 100; ++i) {
>            ++i;
>            System.out.println(i);
>        }
>    }
>
> Platform info:
>
> OS: Microsoft Windows XP Home Edition Version 2002 Service Pack 2
> Eclipse: version 3.3.0
>
> jdwp.dll does exist under jre\bin
>
> What might be wrong? Thanks!
>
>
> --
> Best regards,
> Andrew Zhang
>
> http://zhanghuangzhu.blogspot.com/
>


-- 
With best regards,
Alexei,
ESSD, Intel