This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

edit is not recognized as an internal or external command operable program or batch file windows 7

 
sherin uthayaa
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new for java. i wrote a program for helloworld.

when i enter edit command the following error displlay please help me
Untitled.png
[Thumbnail for Untitled.png]
 
Campbell Ritchie
Sheriff
Pie
Posts: 49733
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You know you can copy text from the command prompt and it is much easier to read than a screenshot?
Please execute this instruction:
echo %PATH%
and tell us the output, because not recognized as something errors often mean your PATH environment variable is not correct. You can read about the PATH environment variable in our FAQ.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49733
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't put your code inside the Java® installation folder. If you uninstall Java® and reinstall it, which you usually do whenever there is an update, the folder might be deleted and all your work might vanish. I usually suggest people create themselves a java folder; you can see the suggestions in this post. You may find that a decent programmer's editor e.g. Notepad2, Notepad++, Crimson, better than edit, which is a very simple and basic program.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a program called edit on your system ? I don't think there is one by default - I get the same error on my machine.
If you are trying to run the notepad program then the name of the executable is notepad.exe, so you need to type notepad <filename> not edit <filename> .
 
Campbell Ritchie
Sheriff
Pie
Posts: 49733
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right, Joanne. I could have sworn I always used to use edit from the command line, so I had to go to all the trouble of finding a machine with Windows on, and it didn't work. Mr Google found that edit has been removed from Windows7/64bit for me.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:You are right, Joanne. I could have sworn I always used to use edit from the command line

Same here, but I use a Windows 7 machine so it was easy for me to check.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49733
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I sue Windows so infrequently and the edit tool even less frequently so that I had never noticed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic