Java: Could not find the main class, program will exit.

Remember to set classpath to current directory and to compile+run outside of package folders:
javac -cp . packageFolder/
java -cp . packageFolder.javaFile

Published by Anders Aaberg

IT-development consultant at Nine A/S MSc. Advanced Computer Science @ University of Leeds, UK

Leave a comment

Your email address will not be published. Required fields are marked *