One of the important points of Java is that it will work on any platform (for example, Windows, Linux, etc.) with the Java Virtual Machine (JVM) installed. The .exe file is compiled to work on only one platform.
, .jar .exe, . , , Java, , .
- Windows, Java. script, , - " runme.bat"
.jar .exe, , , , , .
. .jar Windows, , . , , Apache Ant, .jars . .
EDIT:
Windows - , . , ( → → cmd). , .
Jar : "java -jar myfile.jar"
(.bat - ), "java -jar myfile.jar" ( !), , , myfile.jar. myfile.jar , .
"java -jar lib\myfile.jar" ( , ), myfile.jar, lib, , . , Jars , , :)
, , jar. msgstr "java -jar C:\dev\myfile.jar". , , Jar :)
, Jar , Windows, . . , , , ...
, , , , , Java . , "". . msgstr " java -jar myfile.jar". System.out System.err, , .
: Linux - .