Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A .jar file is a Java Archive. It may be a complete Java application, a library used by another program, or simply a package of compiled classes and resources. Windows recognizes the .jar extension, but does not include a Java runtime.

For a runnable JAR, install a compatible Java runtime or JDK and launch it with java -jar from Command Prompt or Windows Terminal. Double-clicking works only when the JAR has a suitable startup entry and Windows has a working Java association.

1. Install Java on Windows

You need a Java runtime to execute a JAR. A current OpenJDK distribution is suitable; you do not need to find an old Oracle JRE specifically. Microsoft provides Windows installers for the Microsoft Build of OpenJDK. Its EXE installer can update PATH, associate .jar files with Java applications, set JAVA_HOME, and add Java-related registry entries. PATH and JAR-association features are enabled by default in the installer. See Microsoft’s OpenJDK installation instructions.

Install OpenJDK with WinGet

  1. Open Windows Terminal or PowerShell.
  2. Search for available Microsoft OpenJDK packages by running winget search Microsoft.OpenJDK.
  3. Install a package ID returned by that search. For example, run winget install Microsoft.OpenJDK.25.
  4. Close and reopen Terminal after installation finishes.

Use the Java version required by the application. Microsoft currently lists LTS builds including OpenJDK 11, 17, 21, and 25. A JAR compiled for a newer Java release can fail on an older runtime, so installing just any version of Java is not always enough. Check Microsoft’s OpenJDK support table for current support details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
UGREEN USB A to B Printer Cable 5ft, High Speed for HP Canon Brother
  • Ideal Printer Scanner Cable: UGREEN USB 2.0 printer cable is ideal for connecting your scanner, printer, server, hard drive, camera, piano, and other USB b devices to a laptop, computer (Mac/PC), or other USB-enabled devices for data transfer.
  • High-Speed Transfer: Up to 480 Mbps transfers data speed for USB 2.0 devices, the USB Type B cable is backward compliant with full-speed USB 1.1 (12 Mbps) and low-speed USB 1.0 (1.5 Mbps). Compared with a WIFI connection, this USB B Cable provides a more stable data transmission and offers a more efficient work way for you.
  • Wide Compatibility: This Printer Cable compatible with HP deskjet 2540 / 3630, HP officejet 5740, HP Envy 4527 / 4520 / 4523 / 5540, HP photosmart 7520 / 5520 / 5510, Canon MG5750 / MG3550 / MG7550, Epson XP225 / XP245 / XP425, Brother DCP-L2520DW, Lexmark MX310DN, Dell C2665DNF, Samsung Xpress SL-C1860FW, Oki ML1120 / 511DN, Schiit Modi 2 Uber, Yamaha digital piano, DAC, etc.
  • Premium Quality: Corrosion-resistant gold-plated connectors and foil/braid shielding make the SB 2.0 Male to USB B Male cable cord more long-term performance (without noise or signal loss).
  • Plug and Play, No Driver Required. What You Get: a USB 2.0 printer cable. Important Note: This printer USB cable has a USB 2.0 Type B Interface, not USB 3.0 Type B.

Check that Java is installed

Run java -version. A successful result prints the installed Java version. If Windows says “java is not recognized,” Java may not be installed or its bin directory may be missing from PATH. Reopen the terminal first; if the error remains, repair the installation or configure the environment variables.

If you installed a ZIP distribution rather than the Windows installer, set JAVA_HOME to the extracted JDK directory and add its bin directory to PATH. For example, if the JDK is in C:\Program Files\Java\jdk-25, its executable directory is C:\Program Files\Java\jdk-25\bin.

2. Run a JAR from Command Prompt or Windows Terminal

Command-line launching is preferable when troubleshooting because Java displays the actual error instead of silently closing a window.

Run a JAR using its full path

Run java -jar “C:\Path\To\file.jar”. For example: java -jar “C:\Users\Alex\Downloads\my-application.jar”. The -jar option tells the Java launcher to execute the application contained in the archive. Enclose paths or filenames containing spaces in double quotation marks, as in java -jar “C:\Program Files\Example App\example.jar”.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run a JAR from its folder

Change to the directory containing the file, then launch it:

Rank #2
Amazon Basics USB 2.0 Cable, USB-A to USB-B, for Printer or External Hard Drive, Connect to Computer/Laptop/PC, 480 Mbps Transfer Speed, Gold-Plated Connectors, 6 Foot, Black
  • IN THE BOX: (1) 6-foot high-speed multi-shielded USB 2.0 A-Male to B-Male cable
  • DEVICE COMPATIBLE: Connects mice, keyboards, and speed-critical devices, such as external hard drives, printers, and cameras to a computer
  • ULTRA FAST SPEED: Full 2.0 USB capability with 480 Mbps transfer speed
  • DURABLE DESIGN: Corrosion-resistant, gold-plated connectors for optimal signal clarity and shielding to minimize interference

cd /d “C:\Users\Alex\Downloads”

java -jar “my-application.jar”

The /d switch allows cd to change drives as well as folders. For example, it can move from C: to D:. If the JAR is already in the current directory, run java -jar “file.jar”.

Pass arguments to the application

Arguments after the JAR filename are passed to the application’s main() method. For example: java -jar “file.jar” argument1 argument2. The exact arguments depend on the application. Some programs use options such as –help, –config settings.json, or a file path.

Launch without a console window

Use javaw instead of java when the application has its own graphical interface and should not leave a Command Prompt window open. For example: javaw -jar “C:\Path\To\file.jar”. javaw uses the same launcher behavior but does not create an associated console window. It can show a dialog if launching fails, but does not leave ordinary standard output and error messages in a visible terminal. Use java -jar first when diagnosing a problem. See the Java launcher documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Open a JAR by double-clicking it

Double-clicking is convenient for a graphical JAR application, but depends on both the file and its Windows association.

  1. Install a compatible Java distribution.
  2. Open File Explorer and locate the .jar file.
  3. Right-click the file and choose Open with.
  4. Choose Choose another app.
  5. If Java is listed, select it and enable the option to always use that app when available.
  6. If it is not listed, choose Choose an app on your PC and browse to the Java launcher.

For a graphical launch, the intended command is effectively javaw -jar “file.jar”. Simply selecting java.exe or javaw.exe is not always equivalent: the launcher needs the -jar argument before the filename. A manually selected association may therefore open a console, do nothing, or fail to pass the required option.

Rank #3
Sale
Ruaeoda USB to USB Cable 3 ft, USB 3.0 Male to Male Braided Cord, 5Gbps Data Transfer, Compatible with Hard Drive, Cooling Pad, DVD (Not PC-to-PC)
  • [5GBPS SYNC & ANTI-INTERFERENCE] Transfer 10GB in 20s. Premium shielding drastically reduces EMI noise, helping to fix wireless mouse lag & Bluetooth drops. 24K gold-plated connectors ensure maximum signal integrity for cooling pads & drives.
  • [PERFECT 3FT: NO CLUTTER, STEADY POWER] Stop letting 6.6FT cables tangle your desk. Our 3FT cord is the optimal length for cooling pads. It minimizes voltage drop, ensuring high-power hard drives maintain a highly stable connection during heavy transfers.
  • [22,000+ BENDS & LOW PORT STRAIN] Built for relentless plugging. Reinforced SR joints target common stress points to prevent snapping. The lightweight 3ft design minimizes downward cable strain, helping protect your laptop's expensive USB ports.
  • [HEAVY-DUTY & HYDROPHOBIC] Tightly braided nylon handles aggressive pulling and daily desk wear. The stain-resistant, hydrophobic jacket repels everyday spills and wipes clean easily, keeping your workspace looking pristine and professional.
  • [ATTENTION: READ BEFORE BUYING] Standard USB-A to A male cable. Plug-and-play for peripherals. NOT FOR: PC-to-PC Direct Link, video out, phone/tablet charging, or power banks. Ensure your device needs a Type-A port. 3-Year Support included.

Microsoft classifies .jar as a reserved Windows file type. An application’s attempt to register or replace the association may be ignored. If double-clicking remains unreliable, use the explicit java -jar command instead of repeatedly changing Open with. See Microsoft’s information about reserved file types.

4. Why a JAR will not open

The JAR is not an executable application

Not every JAR is designed to be opened. Many are libraries or dependency files that another Java program loads. A runnable JAR normally has a manifest entry such as Main-Class: fully.qualified.ClassName. The specified class must provide public static void main(String[] args). Without Main-Class, java -jar cannot identify the startup class. The file can still be valid and useful as a library. See the Java launcher documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inspect the JAR manifest

To inspect archive contents, use the JDK’s jar command: jar tf “C:\Path\To\file.jar”. To inspect the manifest, extract or inspect the archive with an archive utility and look under META-INF/MANIFEST.MF. Look for a line similar to Main-Class: com.example.Application. The manifest line must use the exact class name and end with a newline. A missing or malformed entry can prevent executable launching.

The Java version is too old

A typical error is UnsupportedClassVersionError. This means the application was compiled for a newer Java class-file version than the runtime can load. Check the application’s download page or documentation for its required Java version, then install that version or a compatible newer release. Microsoft supports Windows x64 and AArch64 builds for current OpenJDK LTS versions, but the required CPU architecture and Java release still matter.

The application needs more than the JAR

Some programs require a particular working directory, configuration file, class path, module path, native library, or collection of dependency JARs. Running the file from Downloads may fail even though the JAR itself is intact.

Rank #4
AINOPE USB to USB Cable, 6.6FT USB 3.0 A to A Male to Male Cable 5Gbps Double End Type A Cord for Data Transfer Compatible with Hard Drive, Laptop Cooling Pad, USB Hub, KVM, DVD
  • 6.6ft Freedom – No More Port Strain: Short 3FT cables yank your USB ports, forcing hard drives and cooling pads into awkward spots. Over time, that tugging damages ports. This 6.6FT USB A to USB A cable gives you slack to route cleanly across any desk, reach a floor KVM, or connect a distant hub. Place devices where they belong, not where a short USB to USB cable dictates. Zero port stress.
  • Never Rupture & Nylon Braided – Hydrophobic & Anti-Pilling: Unique SR anti-break design, tested 400,000+ bends for extreme durability. Sturdy dual-shade braided nylon jacket of the USB-A to USB-A cable offers stronger protection, flexibility, anti-pilling, and tangle resistance. Hydrophobic nylon layer repels water and resists sticky residue — spilled drinks won't affect connection. No cable breakage worries, even on messy desks.
  • 5Gbps Data Transfer Speed – 9-Core Tinned Copper: Transfer large files in seconds with 5Gbps speed, 10x faster than USB 2.0. Inside: a premium 9-core tinned copper matrix with triple shielding (foil+braid) blocks EMI/RFI interference for signal clarity. The 24K gold-plated connectors of the USB to USB cable ensure stable, oxidation-resistant conductivity for many years. Backward compatible with USB 2.0/1.1 ports.
  • Huge Output For Your Cooling Pad: The maximum output of this USB A to USB A male to male USB 3.0 cable is up to 3A, providing enough power for your laptop cooler to perform at its best. No more worry about your laptop getting hot — ensures stable operation of your devices without low-power lag.
  • Wide Compatibility: Connects USB peripherals with USB 3.0 Type-A port to a computer for speedy file transfer. Compatible with Laptop, Laptop Cooling Pad, Smart TV, USB in car, DVD player, USB 3.0 hub, Monitor, KVM, Camera, Wacom, Blu-ray Drive, Set Top Box, 2.5-Inch External Hard Drive Enclosure, and most USB 3.0 external hard drives with Type-A port.

Use the application’s supplied start script or documented command if one exists. For example, a program might need a class path rather than -jar: java -cp “app.jar;lib*” com.example.Application. Do not substitute this command unless the application’s documentation identifies the startup class and dependencies.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Double-clicking appears to do nothing

Run the JAR from a terminal:

cd /d “C:\Path\To”

java -jar “file.jar”

Read the resulting message. It may reveal a missing Main-Class, an unsupported Java version, a missing dependency, a permissions problem, or an application-specific configuration error. This is more informative than launching with javaw, which hides the console.

The file is not really a JAR

Make sure File Explorer is showing the real extension. In File Explorer, select View → Show → File name extensions. A file named program.jar.exe is an executable, not a JAR, and a file that was only partially downloaded may produce archive or class-loading errors.

5. Common commands at a glance

Task Command
Check Java java -version
Run a JAR by full path java -jar “C:\Path\To\file.jar”
Change folder and drive cd /d “C:\Path\To”
Run the JAR in the current folder java -jar “file.jar”
Pass an application argument java -jar “file.jar” –help
Launch without a console window javaw -jar “file.jar”
List archive contents jar tf “file.jar”
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

6. The shortest reliable procedure

  1. Install the Java version required by the JAR.
  2. Open Windows Terminal.
  3. Run java -version to confirm Java is available.
  4. Launch the file with java -jar “C:\Path\To\file.jar”.
  5. If it works and is a GUI application, optionally create a shortcut or use javaw -jar.
  6. If it fails, keep the terminal output and check the manifest, required Java version, dependencies, and application documentation.

FAQ

Can Windows open JAR files without Java?

No. Windows recognizes the .jar extension, but it does not provide the Java runtime needed to execute Java applications. Install a compatible OpenJDK distribution first.

Is a JAR file the same as an EXE?

No. A JAR is a Java Archive. It can contain an application, but it needs a compatible Java launcher and may not be executable at all. An EXE is a native Windows executable format.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
2 Pack USB Printer Cable - 5FT USB A to B Cable - Compatible with Hp, Canon, Brother, Samsung, Dell, Epson, Lexmark, Xerox, and More (Grey)
  • 【Universal Printer Cable】: USB 2.0 Printer Cable is ideal for connecting your scanner, printer, server, camera such as HP, Canon, Lexmark, Epson, Dell, Xerox , Samsung and other usb b devices to a laptop, computer (Mac/PC) or other USB-enabled device
  • 【Gold-plated Connectors,High Speed Transfer】:Constructed with corrosion-resistant, gold-plated connectors for optimal signal clarity and shielding to minimize interference. Up to 480 Mbps transfers data speed for USB 2.0 devices, the printer cable is backwards compliant with full-speed USB 1.1 (12 Mbps) and low-speed USB 1.0 (1.5 Mbps).
  • 【Wide Compatibility】: This A to B USB cable is compatible with Epson XP-600 / XP-200 / WF-7710 / XP-225 / XP-425 / XP-446 / XP-440 / XP-630 / XP-310 / C88 +; Epson Workforce 545; HP Envy 5660/4520/5055; HP Deskjet 3050/1112, HP Photosmart 5520/7520 / C4750, HP 8600 office pro / HP Laserjet Pro M118DW /; Brother MFC L-27000W, Brother HL-L2300D, MC8000 MIDI controller; Bluetooth Cannon MX492, Akai USB EWI, MIDI controller and MIDI keyboard with USB 2.0 B
  • 【Nylon Tangle-free Design】: Tangle-free Nylon Braided Design, this USB 2.0 Printer Cord is far more dependable than others in its price range. Premium nylon braided cable adds additional durability and tangle free
  • 【What You Get】: You can get a 5ft printer cable. and high standards of customer service

Why does java -jar say there is no main manifest attribute?

The JAR does not contain the executable manifest entry Java expects, usually Main-Class. It may be a library or may require a different documented command with a class path and startup class.

Should I use java or javaw?

Use java while testing because it keeps the console visible and shows errors. Use javaw for a graphical application after it works and you do not want a console window.

Can I run a JAR by selecting java.exe in Open with?

Not reliably. Executable-JAR launching requires the -jar option, as in javaw -jar “file.jar”. The Open with association does not always supply that option correctly.

What Java version should I install?

Check the application’s instructions. A JAR compiled for a newer release will not run on an older runtime. Current Microsoft OpenJDK LTS options include versions 11, 17, 21, and 25.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Bottom Line

Install a compatible OpenJDK, confirm it with java -version, and run the file using java -jar “C:\Path\To\file.jar”. If that command reports an error, the problem is usually not Windows Explorer itself. Check whether the JAR has a Main-Class, whether Java is new enough, and whether the application requires additional files or a different startup command.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.