You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Linux搭建Spigot Minecraft服务器:start.sh脚本报错无法访问spigot.jar

Troubleshooting "Unable to access jar file spigot.jar" on Linux Spigot Server

Hey there, let's break down why you're hitting that frustrating error when trying to launch your Spigot server. Here are the most common culprits and how to fix them:

  • You're running the script from the wrong directory
    Linux is strict about your current working directory. If your start.sh is stored in a different folder than spigot.jar, or you execute the script from a parent/other directory entirely, Java won't know where to locate the jar file.
    Fixes:

    1. Navigate to your server folder first with cd /path/to/your/server/directory, then run ./start.sh.
    2. Edit your start.sh to use the absolute path of the jar file. For example, change -jar spigot.jar to -jar /home/yourusername/minecraft-server/spigot.jar.
    3. Add cd /path/to/your/server/directory as the first line in start.sh to ensure it always runs from the correct location.
  • Filename spelling or capitalization doesn't match
    Linux is case-sensitive! If your actual jar file is named Spigot.jar, spigot-1.20.2.jar, or anything else that doesn't exactly match spigot.jar, Java will throw this error.
    Fix: Run ls in your server directory to see the exact filename, then update the -jar line in start.sh to match it perfectly.

  • File permissions are blocking access
    Even if the jar exists, your user might not have permission to read it.
    Fix: First, check permissions with ls -l spigot.jar (if the file exists). You should see something like -rw-r--r-- (read access for all users). If not, run chmod 644 spigot.jar to set proper read permissions. Also make sure your user has access to the server directory itself.

  • The spigot.jar file doesn't exist at all
    It's easy to skip or botch the BuildTools step from the Spigot tutorial. If you didn't successfully compile or download the jar file, it won't be present in your server folder.
    Fix: Run ls in the server directory—if spigot.jar isn't listed, go back through the tutorial's BuildTools steps to generate the jar, making sure the compilation process finishes without errors.

内容的提问来源于stack exchange,提问作者Jeff Ru

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 07:33:07