I downloaded a java program that consists of two folders src and classes containing the source files and class files respectively. Now, the src and classes folders contain a several nested sub-folders wherein the last sub-folder contains the source and class files respectively. More precisely, the path to a source and class file is src/edu/univ/.java and classes/edu/univ/.class. Given that the file containing the main function is Main.java, how can I run this program from command-line.
I have tried:
java src/edu/univ/Main but I get Exception in thread "main" java.lang.NoClassDefFoundError: src/edu/univ/Main
I have also tried: java src.edu.univ.Main but I encounter a similar error
java edu.univ.Mainyou have to use the fully qualified name of the class.srcfolder contains the Java source files. The executable clases are inclasses/edu/...