Skip to content
Sign upLog in
← Back to Community
How do I fix "exit compiler status 1" error?
Profile icon
SHANEKASNER

Screenshot 2020-08-24 at 1.03.26 PM
Screenshot 2020-08-24 at 1.03.08 PM

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
gianvega
Profile icon
SHANEKASNER
Comments
hotnewtop
Profile icon
Coder100

Your class is named wrong. It has to be called Main because that's what the file name is called.

Profile icon
SuzyAC

@Coder100
It does not have to be called Main and indeed should not be. Its just how replit attaches the code to the green run button. For good practice, a class name should describe what the object is ie: a calculator should be called Calculator, a snake game should be called SnakeGame. You then have to change the contents of the hidden .repl file to hook it up to the green button. If you are learning it is fine to leave it as Main to keep the run button working, but in professional terms when you are using other IDEs thats not a good plan.

Profile icon
DynamicSquid

also for your "bruh" file, you might wanna add the java extension to it: "bruh.java"