How to open or run a JAR file in Windows from CMD

Among the most frequent questions for the Windows operating system, help is requested to open a JAR file within the computer. Since through the common method the majority cannot do it. Today we will talk about how to open or run a JAR file in Windows from CMD or command prompt .

JAR is an extension format developed exclusively by the Java programming language , which are nothing more than executable applications that can be used within the computer.

Likewise, this extension allows you to archive or compile programs that are developed through this language, with the advantage of ensuring that no information is lost during the process.

To be able to open a JAR file, it is necessary to have a Java interpreter installed. Since these are the only ones capable of executing the compilation of files and thus start running a specific program.

Within Windows, ordering this task through CMD is the safest and most efficient option to achieve it. However, there are many ways to run these types of files.

Therefore, if you want to learn about the different ways to open Java compilations through Microsoft’s operating system, continue reading this article.

Instructions for opening a JAR file via command prompt (CMD)

The command prompt is recognized as the small black window in Windows that allows you to enter “codes” or commands to execute a specific configuration, task or program.

As for Java, it has become a language that has crept into the majority. Probably even in all aspects that are related to the operational and visual development of devices, consoles, data centers, Internet and much more. This language has made a big difference by being able to function easily on any platform. Covering from Windows operating systems, Mac OS, free software, iOS and Android without any problem.

Therefore, executing a file of these is not a problem within operating systems such as Windows, since this language is clearly part of it.

Step by Step

As mentioned before, the command prompt or CMD allows you to perform configurations and commands as a computer administrator. So opening a JAR file is a possibility within it.

Through the “Windows + X” key combination, a window will open on the computer screen, where you can choose this useful method, to open it as an “Administrator”.

There are two ways to open the Java compilations: the first is a direct method that is done through the command “ java ‘-jar c: filepath.jar ”.

Clearly, aspects such as “C:” and “Filepath.jar” must be changed to the exact address where the compilation is stored, as well as the name under which it is registered within the computer. The second method requires two code prompts. This is because the indications are made separately.

Therefore, start by opening the space where the file is stored via the command ” cd / ‘”, followed by the folder address. After that, enter the name of the JAR file through “ java ‘-jar filename.jar ”. Pressing the “Enter” key will open the content automatically. That way you can open a JAR file in Windows from CMD.

Other ways to open a JAR file from Windows

In case the compilation of files is executed from a graphical environment, you only have to press on the Windows “Start” button to enter the “Windows” section.

Within the window that will open on the computer screen, you will be able to navigate to the storage path where the JAR file is located. After that, proceed to double-click on it and run it automatically .

Furthermore, there is a possibility that these builds need to be run through browsers. So to open it you just have to click on the link for it to run.

From the point of view of a developer, making this type of extensions to ensure the information that is going to be executed within a program is a great advantage that only Java offers.

That is why if you have one of these extensions on your computer, now you know that multiple options are offered to open them from the comfort of Windows . Even on Android there are ways to open all kinds of files .


Leave a Comment