Quantcast
Channel: User Coding Noob Unfiltered - Stack Overflow
Viewing all articles
Browse latest Browse all 11

Answer by Coding Noob Unfiltered for IntelliJ IDEA 15 not generating .class files

$
0
0

I had this issue today (May 4, 2023). Intellij was not generating a .class file. Everything else was there except the class files. After moving the directory and trying different SDKs without any success, the solution was to click on "Repair IDE". At the time my folders were on a removable hard drive. I had the directory folders open when I clicked this option, and I saw the .class being created instantly and my code started working.

In another instance, the bug was a simple syntax error public void main(String args), did you catch it? this allowed for the .java file to be created and a .class to appear in the side menu within IntelliJ CE but no .class file creation on the libraries. The syntax error was a missing squared/array brackets inside the arguments declaration of the main method. While IntelliJ was creating the .java file, these missing brackets did not allow for the .java file to compile properly so a .class file was not created. Once I replaced the brackets, I recompiled the class and it all worked fine.


Viewing all articles
Browse latest Browse all 11

Latest Images

Trending Articles



Latest Images