简体   繁体   中英

I get this error: 'jdb' is not recognized as an internal or external command, operable program or batch file."

I tried remote debugging using Java debugger(jdb). Even though I have installed the jdk and set the JAVA_HOME variable properly but I get an error as above mentioned.

'jdb' is not recognized as an internal or external command, operable program or batch file."

Can anyone please tell what I did wrong?

Necessary details: java -version java version "1.8.0_211" Java(TM) SE Runtime Environment (build 1.8.0_211-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

Please be noted : Anyway all of my java projects in NetBeans and Eclipse everything is working fine with java jdk except remote debugging.

And also if I type, it prompts this error again This is the output image I got

jdb -version 'jdb' is not recognized as an internal or external command, operable program or batch file."

The Java JDK is installed properly, that is why you dont have any issues with Eclipse and Netbeans. JDB isnt working because you have to add the Path to JDK in System Environment Variables. To do this;

  • just search for "System Environment Variable" in the Taskbar search feature and hit {Enter}.

  • Select "Advanced" tab if not already selected.

  • Click "Environment Variables"

  • Select "Path" in User variables or System variables (I have selected it just for my profile)

  • Click "Edit" and "Browse" to path of "C:\\Program Files\\JDK_version\\bin"

Now open up a new command prompt and enter

jdb -version

you should be able to see JDB version details.

I know this is late, but anyone else with the same problem will hopefully find this helpful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM