How do I fix a "Could not find or load main class Main" error?
CodeLongAndPros
Your code needs to be in Main.java
Coder100
Hello, two ways:
- Copy all your code into Main.java
- Configure the run button:
Create a.replit
file:
run="sh main.sh"
Create a main.sh
file:
javac ExpressionsWithLiterals.java RectangleArea.java java ExpressionsWithLiterals
@SHANEKASNER Hi,
It seems like your code that you have written should be transferred to file name called
Main.java
Try!
Thanks!
Hope this helps