Skip to content
← Back to Community
How to create a Java Package
Profile icon
acohenwolcott

I want to split my classes into different files using Java Packages. However, the compiler cannot find the classes in other files and I'm getting errors:

Main.java:12: error: cannot find symbol
MyFrame myFrame = new MyFrame();
^
symbol: class MyFrame
location: class Main
Main.java:12: error: cannot find symbol
MyFrame myFrame = new MyFrame();
^
symbol: class MyFrame
location: class Main
2 errors

Voters
Profile icon
Ma-LoretoLoreto
Profile icon
DimasPrasetyo5
Profile icon
acohenwolcott
Comments
hotnewtop
Profile icon
EpicGamer007

Can you attach the repl? I need to see the file and folder structure

Profile icon
acohenwolcott
Profile icon
EpicGamer007

@acohenwolcott put all your java files in the folder animation001. then try

Profile icon
acohenwolcott