I'm using IntelliJ IDEA 2021.3.3 (Community Edition) , I upgraded it to the latest verion and since then I'm facing this error even when I downgraded it.
Any project I make runs fine inside the IDE but the jar file built using build artifacts
never runs from cmd, shows this error
Error: Could not find or load main class E:\HelloWorld\out\artifacts\HelloWorld_jar\HelloWorld.jar Caused by: java.lang.ClassNotFoundException
I tried the solutions at this answer but nothing seems to work.
here is the jar file: https://www.dropbox.com/s/raw/1p2inr054qsjhcs/HelloWorld.jar
(scanned by VirusTotal , or run the jar online in this Colab notebook )
and the project folder zipped : https://www.dropbox.com/s/raw/wzxz0z48x1shkyk/HelloWorld.zip (scan VirusTotal)