If you are getting that error, it means that either Java is not installed, or is not in your path.
If Java is not installed, go to http://www.java.com to install the most recent version of the JRE.
If you're sure you have already installed Java ensure the Java executable is in your system's path. You can do this by first finding the directory it is installed in. For example, mine is installed in C:\Program Files\Java\jre6. The executables are located in the bin directory.
In order to set your path (Assuming Windows Vista), go to Start -> Control Panel -> System, then click on the 'Advanced System Settings' link on the left, then the 'Environment Variables' button. In the lower section (Labeled 'System Variables'), scroll through and find the item labeled 'Path' and double click it. In the field labeled 'Variable value' go to the end and add a semicolon (;), and then the path your installation of Java is located. Using the example I gave above, I would have added ;C:\Program Files\Java\jre6\bin to the end of the line.
The procedure for 64-bit Windows Vista or Windows 7 is the same, except the text you will add to the Path variable is ";C:\Program Files (x86)\Java\jre6\bin". Notice there is still a semi-colon at the beginning of the line.
Once you have done this, you will need to close and reopen the command prompt if it is already open, and you should be able to run java without getting this error message.
1. Remove java then reinstall 2. check your up to date 3. make sure you using the correct command 4. make sure your an administrator (or run it as a) 5. try again :)
The 'ls' command is an external command (found in /bin)
The DOS message "bad command or file name" means that the command you entered was not recognized as an internal command or as an external command in the working directory or path.
It depends on the shell program you are running in your environment; there are a number of 'internal' commands that are recognized by the shell and do not exist as "commands" on the system anywhere. Any command that is not internal to the shell would be considered an external command. To find a list of basic external commands, try to do a 'ls /bin', which lists very essential and common external Unix commands. Look at the 'man' or 'info' entry for your shell to find a list of internal commands. An internal command would be one that is recognized by the shell and the shell does not have to execute a program to do the command. An example would be the 'alias' command, which creates, removes, or lists aliases in the environment. An external command would be one that you might find in the /bin directory, such as 'ls'.
Internal commands are functions that are built into the command interpreter, External commands are those not included in the interpreter, and are instead invoked by calling an external binary. Whether or not a particular command is internal or external varies by system. For example, echo is an internal command in MS-DOS (it is built into COMMAND.COM), while in most Linux systems, it is an external one, provided by GNU coreutils.DOS Internal command is associated with his Shell file Command.Com.. DOS external command is saved on the disk..
An internal command is one that is built into the shell or command interpreter, rather than executed as a separate binary.
In MS-DOS there are two types of commands. An Internal command, which is a command embedded into the command.com file, and an external command, which is not embedded into command.com and therefore requires a separate file to be used. For example, if your computer does not have fdisk.exe and you try using the fdisk command, you would receive an error "Bad command or file name." Fdisk is an external command that will only work if fdisk.exe, or in some cases, fdisk.com, is present. However, as long as MS-DOS is running on your computer internal commands such as the CD command will always be available and does not require any other files to run. Computer Hope's MS-DOS page lists what commands are external and what are internal on each of the command pages. In addition, you can see our dictionary internal command page and/or external command page for a complete listing of each of the internal and external commands available.
1. Internal Command: Present in Command.com..2. External Command: Present in the disk..
There is no easy way - if there is a path name involved then it is external. You could use the 'whence' or 'whatis' commands to see if they are an alias or internal command, but that varies depending on which login shell you are using.
Open command window "cmd" from Windows prompt. Type in "javac" in the window. The command should execute giving full usage of javac and its options. If you get an error message saying that "Javac is not a recognized as an internal or external command", than the Path has not been set.
In MS-DOS there are two ways commands are executed. An Internal command, which is a command embedded into the command.com file, and an external command, which is not embedded into command.com and therefore requires a separate file to be used. For example, if your computer does not have the fdisk.exe file and you try using the fdisk command, you would receive an error "Bad command or file name" error message. Fdisk is an external command that will only work if fdisk.exe, or in some cases, fdisk.com, is present.
A list of internal/builtin commands is available for each shell environment by looking at the 'man' entry. Anything not listed there is either an alias or an external command.