So I have only used python before and decided to learn java as my second language.I have installed both jdk(jdk-14.0.1
) and jre(jre1.8.0_251
) files.Now I added the PATH as C:\Program Files\Java\jre1.8.0_251\bin
.Now as I run java
on cmd prompt,I am getting a big documentation which I thought as the proof of successful additon of PATH.
But as I run a code on atom(yes i have set format of file as java in atom),I am still getting this error:
Selection Based runner not available for Java.
Now I also created a test file in notepad:
class MyClass {
public static void main(String[ ] args) {
System.out.println("Hello World");
}
}
And when I run it in cmd prompt like:
javac test.java
and then
java test
I am getting Error: Could not find or load main class test
.
What have I done wrong