How to run the jar archive with the working classes inside without manifest.mf via the windows console?

  • A strange question, but you try to extract the data from the .jar file to a specific folder, and then use the console to Main.class only here in the console
  • I have 3 classes and 1 interface. Assignment: shove hands in the jar and run from the console without Manifest.mf - DOLLARDrow

1 answer 1

Taken from English WITH :

 java -cp MyJar.jar com.mycomp.MainClass /home/myhome/datasource.properties /home/myhome/input.txt 

MyJar.jar - the actual name of your JAR file

com.mycomp.MainClass - the full name of your class (with the package)

/home/myhome/datasource.properties /home/myhome/input.txt - parameters that will be passed to the main(String ... args) method