title: IntelliJ IDEA is not recognizing my java files as runnable and instead wants to run the class files. Any ideas of how to fix?
body: <p>Anytime I try to run a java file by clicking run, it instead tries to run the class file and thus gives a no main method error. </p>
  
  <p>When I try to right click on a java file and run that, it doesn't recogize it as a file that is runable. </p>
  
  <p>I am still able to run programs from the command prompt but I would prefer to be able to run them in IntelliJ. </p>
  
  <p>This occurred after trying to create a Class path when using JSon Libraries.</p>
  
  <p>Edit: </p>
  
  <p>Normally it shows java files with this icon: 
  <a href="https://i.stack.imgur.com/ZM6xu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZM6xu.png" alt="enter image description here"></a></p>
  
  <p>But instead it's showing this icon for java files: <a href="https://i.stack.imgur.com/Afs1s.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Afs1s.png" alt="enter image description here"></a></p>
  
  <p>I think the change in icon might have something to do with it. </p>
  
  <p>Edit 2: 
  the exact error I get is "C:\Program Files (x86)\Java\jdk1.8.0_181\bin\java.exe"...bunch of other program file locations</p>
  
  <p>Error: Could not find or load main class sample.Main</p>
  
  <p>Process finished with exit code 1</p>