Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to run JAR file on any OS?

Tags:

java

jar

Is it possible to execute a JAR file on any OS (like Windows, Linux, Mac OS X)? I want to build a simple application that I want to run on Linux, Windows, and Mac OS X. Could the JAR file be run on any OS with java installed?

like image 904
Mohit Deshpande Avatar asked May 18 '10 22:05

Mohit Deshpande


People also ask

Can a JAR file run anywhere?

Spring Boot can take your application code, combine it with an embedded JEE Application Server (like Tomcat, which you never even see), and package it all up together into an executable JAR file. This JAR file will run anywhere there's a compatible JVM.

Are JAR files OS independent?

Yes, JAR files and their contents are fully platform independent.

Can a JAR file run on Windows and Linux?

Steps to run a JAR file on Windows, Mac or Linux. To run a JAR file on Windows, Mac or Ubuntu machines, follow these steps: Verify that Java is installed on your computer. Confirm the computer's PATH variable includes Java's \bin directory.

Can JAR files run on Android?

Your Android device can run Java games and apps, but it isn't designed to do so, and hence you don't find any Java emulators on the Play Store to run jar files on Android devices.


1 Answers

The Jar files run on any OS for which a JVM exists.

like image 140
Snehal Avatar answered Oct 02 '22 14:10

Snehal