Skip to content
How to change the file name without error?(java)
Profile icon
samjh8xie

(I'm a new coder so I might not know a lot.) Basically, I changed the class from "public class Main" to "public class emails". I then changed the file name to "emails.java" too, but when I ran the code, it said "unable to run, main file "Main.java" not found." It kept on saying this after everything I tried. How can I stop this?
Also, whenever I add a new file to try to start over, it just prints the code from the Main.java file no matter what I do.

image

You are viewing a single comment. View All
Answered by JacobMcPherson1 [earned 5 cycles]
View Answer
Profile icon
samjh8xie

@JacobMcPherson1
Thanks I appreciate it! Do I have to do this for every repl?