0
votes

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 againThis is the output image I got

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

1
I am not a Windows person, but have you tried reopening and closing the terminal after setting the environment variable? Also, I know you said you set JAVA_HOME, but have you added the Java bin directory your PATH variable?KellyM
@KellyM Thank you very much, I had to recheck the path to the java/bin. and I missed a letter thereNilfa Sahilan

1 Answers

0
votes

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.