Could not find the main class
Hey guys...new to Java so sorry if this is a stupid question.
OS: Windows 7
In CMD I'm typing:
public static void main ( String  args )
// Set n to be user defined input
int n = Integer.parseInt(args);
// Loop through n and print required sequence
for (int i = 0; i < n; i++)
System.out.print(i+1); // n
System.out.print((i+1)^2); // n^2
System.out.print((i+1)^3); // n^3
which creates the class in the same folder as ex1.java, then:
java -cp . ex1_1 4
but I get the error: "Could not find or load main class"
Any ideas? Thx for any help :)
Re: Could not find the main class
Actually don't worry..have just solved it! Feel free to delete...
My code should have been java -cp. ex1 4, as opposed to ex1_1!