You can use this command to start a jar file and specify a main class.
java -cp file.jar path.to.MainClass
My problem is that I just have a class that is not contained in a package. So the main class is just called MainClass. So the command becomes
java -cp file.jar MainClass
The problem is that java does not seem to be able to load the class and just says it could not be found or loaded.
Is there a way to start a jar with the -cp argument like that?