Ok I am new to Java and was trying to run a java program from the command prompt (because Sublime compiles and runs in it's little thing but doesn't allow for user inputs and stuff).
I set the command prompt to the folder which I have my file which is called Learner.java.
C:\Users\jonat>cd C:\Users\jonat\Desktop\Projects\Java
I have set a path for my JDK bin in my environment variables and created a JAVA_HOME variable with a value to the JDK bin (which some other post suggested).
Before I go into the issue, this is my code:
class Learner {
public static void main(String[ ] args) {
System.out.println("Jonathan's Project");
}
}
As you can see, it is a simple print project with "Jonathan's Project" as the output. I have already tested this in Sublime 3 and it compiles and prints.
HOWEVER, when I call upon the program in cmd prompt, it just runs for a second or so and then skips a line and starts a new command line. No "Jonathan's Project" prints which is weird because the cmd prompt shows no error and it acts like it ran the program but nothing was run...
javacinvokes java compiler.