1

I am using atom and I installed the "script" package to run java directly, but every time I use Ctrl Shift B to run a java file it shows this error message:

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

I did add the jdk to environment variable 'path'.

This is the code I am trying to run:

 package script;
    public class script {
        public static void main (String []args)
        {
            System.out.println ("Hello world");
        }
    }

What could be missing here?

Yuyao Cheng
  • 13
  • 1
  • 3
  • Possible duplicate of ['make' is not recognized as an internal or external command, operable program or batch file - Windows 7](https://stackoverflow.com/questions/23723364/make-is-not-recognized-as-an-internal-or-external-command-operable-program-or) – user10089632 Sep 01 '17 at 22:07
  • This question has been asked so many times – user10089632 Sep 01 '17 at 22:07

1 Answers1

1

You need to ensure c:\windows\system32 is still in your path.

You have probably set your path to the JDK, rather than appending the path to the JDK.

https://discuss.atom.io/t/cmd-is-not-recognized-as-an-internal-or-external-command/34704

You want something like:

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\user>echo %PATH%

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wi
ndowsPowerShell\v1.0\;C:\PROGRA~1\Java\JDK18~2.0_1\bin

C:\Users\user>
Donald_W
  • 1,773
  • 21
  • 35