So I have a java project in intellij right now. I'm trying to get it to run through ssh on a linux system.

I've uploaded the class files, however The project will not run unless I take out all the package declarations and rebuild the project.

Whats the correct way to build/run a java project using bash?