"Unrecognized as command" message when trying to call Java program from command line -


I'm unable to call my Java program from the command line. I receive this message:

"Initier is not recognized as an internal or external command, operative program or batch file."

I can read the directory with the command "command" and see the program that I am trying to launch, but can not find this error message!

Here I am looking for: C: \ users \ myName \ Java_WorkSpace & gt; And then I enter: InitArray 5 0 4

Again, I can see this program in the directory but I can not access it. What am i doing wrong ???

Here is the program code:

  public class InitArray {public static zero main (string [] args) {// check number command line Argugs if (args.length ! = 3) System.out.println ("Error: Re-enter entire command, \ n" + "with an array size, initial value, and increment.); Else {int arrayLength = integer Paracet (Argos [0]); Int [] array = new int [arrayLength]; Int initialValue = integer Paracet (Argos [1]); Int indentation = integer .centre (argens [2]); // Calculation of values ​​for each array element (int counter = 0; counter & lt; array.label; counter ++) array [counter] = initial value + increment * counter; System.out.printf ("% s% 8s \ n", "index", "value"); // display array for index and value (int counter = 0; counter & lt; array.label; counter ++) system.out.printf ("% 5d% 8d \ n", counter, array [counter]); } // end else} // end main} // end class InitArray    

you To make a Java executable call, first need to type java .

Try it:

java InitArray 5 0 4

Comments