SHANE KASNER

@SHANEKASNER (5)
SHANEKASNER
SHANEKASNER
shared a Post
1 year ago
5
How do I fix a "Could not find or load main class Main" error?
Ask
Screenshot 2020-08-24 at 11.10.26 AM Screenshot 2020-08-24 at 11.10.38 AM
Unit1_Topic1.3_Labs
Java
Read full post
PattanAhmed
PattanAhmed @SHANEKASNER Hi, It seems like your code that you have written should be transferred to file name called Main.java Try! Thanks! Hope this helps1 year ago
Coder100
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 `1 year ago
CodeLongAndPros
CodeLongAndPros Your code needs to be in Main.java 1 year ago
SHANEKASNER
SHANEKASNER
shared a Post
1 year ago
2
How do I fix "exit compiler status 1" error?
Ask
Screenshot 2020-08-24 at 1.03.26 PM Screenshot 2020-08-24 at 1.03.08 PM
Unit1_Topic1.3_Labs
Java
Coder100
Coder100 Your class is named wrong. It has to be called Main because that's what the file name is called.1 year ago
DynamicSquid
DynamicSquid also for your "bruh" file, you might wanna add the java extension to it: "bruh.java"1 year ago
DynamicSquid
DynamicSquid You can't have a "public" class public class RectangleArea { public static void main(String[] args) { int length=14; int width=16; int area; area=length*width; System.out.print(area); } } get rid of the "public class" and only put "class". public can only be used for methods1 year ago