Is it possible to execute a JAR file on any OS (e.g. Windows, Linux, Mac OS X)? I want to create a simple application that I want to run on Linux, Windows and Mac OS X. Can the JAR file run on any OS with java installed?
Jar files run on any OS for which a JVM exists.
Yes, if you do not use any native libraries (JNI), this is how Java works. It is platform independent.
, , Java , . , JAR , , ( Windows , ).
JAR JAR . , , JAR , , Java (JVM) . JAR , :
java -jar myprogram.jar
JAR JAR, JAR . JAR :
java -classpath path/to/your/program.jar com.mypackage.Main
Jar , JVM. jar, , Java, , (, Windows), .
, , (, java -jar name.jar.) .
java -jar name.jar
Source: https://habr.com/ru/post/1746089/More articles:How to create an UnhandledException? - .nethttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1746085/how-do-you-add-annotations-to-an-image-in-qt&usg=ALkJrhiayfnJTudwg3b97GXDLJHr-psFfAWPF application with MS Access database as a data source - databasebinlog_format = STATEMENT and CURRENT_TIMESTAMP with MySQL replication - mysqlHow to get an overview and methodology of programming in Python - pythonRunning jar file in other versions of Windows - javaSkipping readLine () method of BufferedReader in java - javaHow do you get the HTML Browse button to filter and display only images? - htmlis there a way to show which field you updated in mysql? - phpCore equivalents for NSURLRequest and NSURLConnection - iphoneAll Articles