You need to run the jar file from the command line.
If you double-click on it, you will not be able to see how command line operations are performed in the background. Jar files are usually double-clicked only when they include the GUI.
To run the jar file from the command line, simply do the following:
java -jar ConsoleTest.jar
Assuming you set environment variables for java.exe and there is a jar file in the current directory.
If this does not work, it may not be your code error. There is also the possibility that the manifest file pointing to the Main class was not configured correctly.
Enkrypt
source share