October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk11 min

How to Fix “Unable to Access Jarfile” on a Minecraft Server

Java cannot open the JAR path in your Minecraft startup command. This guide shows how to verify the real filename, correct local Windows and Linux paths, fix hosting-panel variables, check permissions, and replace a corrupt download.

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.

The Unable to access jarfile error means Java cannot open the exact file path supplied after -jar. In most cases, the server JAR is in a different folder, has a different filename than the command, is hidden behind a second extension such as .jar.jar, or cannot be read by the account starting the server. Find the real filename, run Java from the folder that contains it (or use its full path), quote paths containing spaces, and update any hosting-panel startup variable to match the file exactly.

What “Unable to access jarfile” means

When you run a command such as java -jar server.jar nogui, Java treats server.jar as a path. It first tries to open that path; only after the file is opened can Minecraft start. The message Error: Unable to access jarfile server.jar therefore points to a file-location, filename, path-format, or permission problem rather than a Minecraft world or mod problem.

As an Amazon Associate I earn from qualifying purchases.

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

The name printed in the error is your first diagnostic clue. Java is reporting the exact name it was told to open. If the directory contains paper-1.21.1-123.jar but the command says server.jar, Java will not guess that those files are equivalent. Relative paths are resolved from the process’s current working directory, which may not be the folder visible in File Explorer or your terminal window.

A Minecraft Forum troubleshooting case shows the same failure with java -jar minecraft_server.jar --nogui: the command fails when that exact file is absent from the directory where the command runs or when the filename is incorrect. Playkeeper describes the condition the same way: Java cannot open the file named after -jar.

Quick diagnosis: identify which situation you have

What you observe Most likely cause What to check first
The message names a JAR that is not visible in the folder The command is running in another directory, or the JAR has a different name Print or inspect the current directory, then compare it with the JAR’s actual filename
The folder appears to contain the file, but Java still cannot open it Hidden extensions, a spelling/capitalization difference, or a path with unquoted spaces Show file extensions and copy the exact name; quote the full path
A hosting panel fails immediately after a build upload The startup JAR variable still contains an old or generic filename Compare the startup field with the file in the panel’s main server directory
The error has changed to Invalid or corrupt jarfile The file can be found but is damaged or is not a valid JAR Delete the damaged copy and download a fresh server JAR from the relevant official software source

Do not troubleshoot these as the same error. “Unable to access jarfile” is about opening the path. “Invalid or corrupt jarfile” means Java reached a file but could not read it as a valid archive.

Fix a local Windows server

1. Reveal the complete filename

Open the folder where you believe the server JAR is stored. In Windows File Explorer, enable visible file extensions from the View options (use the option labeled File name extensions in current Explorer versions). Then inspect the name character by character.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Look for a version suffix, such as paper-1.21.1-123.jar, when your command still says server.jar.
  • Check capitalization, spaces, hyphens, underscores, and every digit.
  • Watch for accidental double extensions such as server.jar.jar. This can happen when Windows hides the known extension during renaming.
  • Make sure you are looking at the server JAR, not a similarly named installer, log, ZIP archive, or backup.

Use the filename as it is displayed after extensions are enabled. Do not type a remembered name from an older server download.

2. Open a command window in that folder

The simplest way to avoid a working-directory mismatch is to start the command from the folder containing the JAR. In File Explorer, click the address bar, type cmd, and press Enter to open Command Prompt at that location. You can also open Command Prompt normally and change directories with cd; enclose the folder path in quotation marks if it contains spaces.

cd "C:Minecraft Server"

Verify that the prompt now points to the server folder before starting Java. If you use PowerShell instead of Command Prompt, open it in the same folder and run the same Java command; the important detail is the current directory, not the shell brand.

3. Make the JAR name in the command exact

Replace the placeholder in your startup command with the filename you actually found. For example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
java -Xms2G -Xmx4G -jar server.jar nogui

If the file is really named paper-1.21.1-123.jar, use:

java -Xms2G -Xmx4G -jar paper-1.21.1-123.jar nogui

The memory options in these examples are illustrative command values; the access fix is the portion after -jar. Keep your existing launch arguments if they differ. Java must match the JAR filename exactly; it will not automatically select the newest version in the directory.

4. Use an absolute path when you do not want to change folders

You can point Java directly to the file instead of relying on the current directory:

java -jar "C:Minecraft Serverserver.jar" nogui

Put quotation marks around the entire path when any folder name contains a space. Without them, the shell splits the path at the space and Java receives an incomplete filename. An absolute path also makes it clear which copy of the JAR is being used when several server folders exist.

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

5. Check that the account can read the file

If the name and path are correct but the message persists, check access rights. The Windows account that launches the server must be able to read the JAR and traverse every parent folder between the drive root and the file. A file copied from another account, a protected directory, or a folder with restrictive permissions can fail even when its name is correct.

  • Open the file’s Properties and inspect the Security permissions for the account running the server.
  • Confirm that the account has read access to the JAR and access to each parent folder.
  • If a scheduled task or service starts Minecraft, check that it runs under the account you are inspecting; permissions for your interactive account do not automatically apply to a different service account.

After correcting access, rerun the command from the verified folder. Do not grant broad permissions unnecessarily; give the server account the minimum read and folder-traversal access it needs.

Fix a local Linux server

1. Confirm the directory and filename

Change to the directory that contains the JAR, then list its contents so the shell shows the real name:

cd "/srv/minecraft server"
ls -l

Compare the listing with the name after -jar. Linux filenames are case-sensitive, so Server.jar and server.jar are different files. A versioned build name, an underscore instead of a hyphen, or an extra extension is enough to trigger the error.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Mattel Games UNO Minecraft Card Game with Storage Tin,Ages 7+ | Video Game Themed Deck with Special Rule for Kids, Teens, Parties & Family Game Night, 2-10 Players (Amazon Exclusive)
  • The classic UNO card game builds fun on game night with a Minecraft theme.
  • UNO Minecraft features a deck and storage tin decorated with graphics from the popular video game.
  • Players match colors and numbers to the card on top of the discard pile as in the classic game.
  • The Creeper card unique to this deck forces other players to draw 3 cards.
  • Makes a great gift for kid, teen, adult and family game nights with 2 to 10 players ages 7 years and older, especially Minecraft and video game fans.

2. Run from that directory or quote the full path

From the directory shown by pwd, run the command with the exact filename:

java -Xms2G -Xmx4G -jar server.jar nogui

Alternatively, specify the complete path:

java -jar "/srv/minecraft server/server.jar" nogui

Use quotation marks or escape each space in a Linux path. A relative path such as server.jar is interpreted from the directory in which the process was launched, not from the directory where the shell script happens to be stored.

3. Verify read and directory permissions

The account starting Minecraft needs read permission on the JAR and execute (traverse) permission on every parent directory. Check ownership and mode with:

ls -l server.jar
namei -l "/srv/minecraft server/server.jar"

If a service manager, container, or hosting script starts the process as another user, inspect permissions for that user rather than for your login account. Correct the ownership or permissions according to your system’s access policy, then test the command again. The goal is readable server files and traversable parent directories, not unrestricted access.

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.

When the folder contains a different JAR name

Modern server downloads commonly include a product and version in the filename. A startup command copied from an older tutorial may still contain server.jar while the current file has a longer name. You have two valid approaches:

  1. Edit the command or startup script so the value after -jar is the current filename.
  2. Rename the JAR to the simple name used by your command, such as server.jar, then verify that the rename did not append a second .jar extension.

Changing the command is usually safer when other scripts or backups depend on the downloaded filename. Whichever approach you choose, use one consistent name in the command, scheduled task, service definition, and hosting-panel startup field.

Fix a hosting-panel server

A managed Minecraft panel normally starts the server from its main server directory and supplies a startup command or JAR-name variable. In that environment, opening a terminal on your own computer and changing directories will not fix the panel’s process. The panel’s configured value must match a real file in the directory that the panel uses.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Mattel Games UNO Minecraft Card Game for Kids, Adults, Families & Parties, Deck & Special Rule Inspired by the Video Game, 2 to 10 Players
  • Now Minecraft lovers can play a special version of UNO!
  • Same as Basic UNO but features Minecraft characters and includes special Creeper rule card. Draw this card and the other players have to draw three more cards from the pile!
  • The goal is to get rid of all the cards in your hand.
  • First player or team to 500 wins.
  • When you're down to one card, don't forget to yell "UNO"!

1. Inspect the panel’s main directory

Open the panel file manager or server files view and note the complete JAR filename exactly as displayed. Include the extension, capitalization, version number, and punctuation. If the panel lists paper-1.21.1-123.jar, a startup value of server.jar is a mismatch unless a separate file with that exact name also exists.

2. Edit the startup command or variable

Open the server’s Startup, Launch, or equivalent configuration page. The label varies by panel, but the setting is usually a startup command or a variable representing the server JAR. Replace the old value with the filename from the panel’s file list. Save the setting, restart the server, and read the new console output.

Do not add a local Windows path such as C:Minecraft Server to a hosted panel. The panel has its own filesystem and working directory; use the file name or path format that the panel documents for its main server folder.

3. Protect world and configuration data before reinstalling

If the panel offers a reinstall or reset function, back up the world, configuration files, permissions, and any other data you need first. A reinstall can overwrite files. Reinstalling is not the first response to a filename mismatch: correct the startup value and confirm the existing JAR before using a destructive function.

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

Managed Minecraft server hosting can be useful when you do not want to maintain local paths and startup variables, but the same rule still applies: the panel’s startup JAR value must point to an existing readable file.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What to do if the message changes to “Invalid or corrupt jarfile”

This is a different failure stage. Java has located and opened the path, but the contents are damaged, incomplete, or not a valid server JAR. Omne Hosting distinguishes this symptom from a missing or misnamed JAR and recommends replacing the download.

  1. Stop the server process and preserve any world or configuration files outside the JAR.
  2. Delete or move the suspect JAR so the old file cannot be launched accidentally.
  3. Download a fresh server JAR from the relevant official software source for the server software you selected.
  4. Place the new file in the directory used by your local command or hosting panel.
  5. Update the command or startup variable if the new download has a different filename, then start the server again.

Do not treat a successful file listing as proof that the archive is valid. A file can exist at the right path and still be unusable; the error text tells you which stage failed.

A repeatable troubleshooting procedure

Use this order so each test eliminates a specific cause rather than changing several settings at once:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Read the filename in the error. Copy the text after jarfile, including capitalization and the extension.
  2. Inspect the actual server directory. Show extensions in Windows Explorer or list files with ls -l on Linux.
  3. Compare the two names character by character. Check version suffixes, spaces, hyphens, underscores, capitalization, and accidental .jar.jar.
  4. Verify the working directory. Run the command from the directory containing the JAR, or replace the relative name with a correctly quoted absolute path.
  5. Test readability. Confirm that the account launching Java can read the JAR and traverse every parent directory.
  6. For a panel, check its startup field. Match the panel variable to the JAR shown in the panel’s main directory rather than to a filename on your own computer.
  7. Classify any new error. If Java now reports an invalid or corrupt JAR, replace the download instead of continuing to edit paths.

Common mistakes that keep the error coming back

Relying on a tutorial’s generic filename

A tutorial may use server.jar as a convenient example, while your download includes a version-specific name. Treat the example as a pattern, not as evidence that your file has that name.

Leaving extensions hidden

When Windows hides known extensions, renaming server.jar to server.jar can produce server.jar.jar without making the extra suffix obvious. Enable file-name extensions before renaming or editing the command.

Starting the script from a shortcut or service

A shortcut, scheduled task, service, or panel can use a different working directory from the one you opened interactively. A command that succeeds in your terminal may still fail when an automated launcher starts it elsewhere. Set the launcher’s working directory explicitly when that option exists, or use a quoted absolute JAR path.

Changing memory settings first

Options such as -Xms2G and -Xmx4G control Java’s memory allocation after the JAR can be opened. They do not repair a wrong filename or inaccessible directory. Fix the path stage first.

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

Reinstalling before backing up

A reinstall may remove or replace files. Back up the world and configuration data before using it, and try the non-destructive filename and permission checks first.

Final verification checklist

  • The filename after -jar exactly matches a real file, including capitalization and extension.
  • File extensions are visible, and the file is not actually named .jar.jar.
  • The command runs from the directory containing the JAR, or uses a correctly quoted absolute path.
  • Every directory in the path is traversable by the account launching Java.
  • The account has read access to the JAR.
  • A hosting panel’s startup JAR variable matches the file in its own main directory.
  • World and configuration data are backed up before any reinstall or reset operation.
  • If the message says Invalid or corrupt jarfile, the JAR has been replaced with a fresh official download.

Once these checks agree, rerun the same startup command. If the access message disappears and Minecraft reports a different startup problem, continue with that new error; it is evidence that Java has moved past the file-opening stage.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.