Since 2 days now I am trying to run the simplest program and I can't. I run my programs from Windows cmd prompt.
Program:
public class Bla {
public static void main(String [] args) {
System.out.println("works");
}
}
Saved the source code as Bla.java. Compiled the program with javac Bla.java --> Bla.class created. Tried to run the program with java Bla.class I get the error: "Could not find or load main class Bla.class"
I am not a complete newbie with java
1. I have configured my path and my classpath variable (Exact values below). Path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem;C:\Python27;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Skype\Phone;C:\mysql\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\Program Files\Java\jdk1.8.0_144\bin
CLASSPATH: .;C:\Program Files\Java\jre1.8.0_144\lib;
2. my program doesn't belong to any package and doesn't call any package
I call everything from my command line. I tried uninstalling and reinstalling java developer kit.Every time I get the same error. This is not the first time I have installed java or run a program in java but I haven't written something in a long time. What am I doing wrong?
Thanks