Spigot Java Version is locked in the system default and cannot be modified

Operating system name/version: Windows 11

Product name/version: 2.5.0.6

Problem Description:

The official version can be downloaded and used with java 21, but spigot cannot be downloaded and used.

ServerMain/INFO20:00:37
Loaded 1175 recipes
Loaded 1276 advancements
Server thread/INFO20:00:37
Starting minecraft server version 1.20.5
Loading properties
Default game type: SURVIVAL
Generating keypair
Starting Minecraft server on 0.0.0.0:28245
Using default channel type
20:00:38
Preparing level "world"
20:00:39
Preparing start region for dimension minecraft:overworld
Worker-Main-31/INFO20:00:39
Preparing spawn area: 2%
Worker-Main-28/INFO20:00:40
Preparing spawn area: 36%
Worker-Main-46/INFO20:00:41
Preparing spawn area: 75%
Server thread/INFO20:00:41
Time elapsed: 1608 ms
Done (3.443s)! For help, type "help"
20:01:00
Unknown or incomplete command, see below for error
tps<--[HERE]
20:01:31
Stopping the server
Stopping server
Saving players
Saving worlds
Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether
Saving chunks for level 'ServerLevel[world]'/minecraft:the_end
ThreadedAnvilChunkStorage (world): All chunks are saved
ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
ThreadedAnvilChunkStorage (DIM1): All chunks are saved
ThreadedAnvilChunkStorage: All dimensions are saved
Installer20:01:46
[--rev, 1.20.5]
Loading BuildTools version: git-BuildTools-a50d932-181 (#181)
Java Version: Java 18
Current Path: D:\AMPDatastore\Instances\Minecraft01\Minecraft\spigotbuild
git version 2.41.0.windows.1
Picked up _JAVA_OPTIONS: -Xmx1024M
openjdk version "18.0.2.1" 2022-08-18
OpenJDK Runtime Environment Temurin-18.0.2.1+1 (build 18.0.2.1+1)
OpenJDK 64-Bit Server VM Temurin-18.0.2.1+1 (build 18.0.2.1+1, mixed mode, sharing)
Attempting to build version: '1.20.5' use --rev <version> to override
20:01:47
Found version
{
"name": "4109",
"description": "Jenkins build 4109",
"refs": {
"BuildData": "a7f7c2118b877fde4cf0f32f1f730ffcdee8e9ee",
"Bukkit": "6a8ea76458df4605ebc2ddf18e475849c56be981",
"CraftBukkit": "8c1e7c84109cbbf4755c295a0ac88f7e302aeefe",
"Spigot": "b698b49caf14f97a717afd67e13fd7ac59f51089"
},
"toolsVersion": 181,
"javaVersions": [65, 66]
}
*** The version you have requested to build requires Java versions between [Java 21, Java 22], but you are using Java 18
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.

Steps to reproduce:

Solutions currently taken:
Using BuildTools

Just use spigot build tools on your PC, then drag and drop it into AMP’s web file manager.
Running buildtools in one of AMP’s directories can mess up file permissions. I’d suggest running ampinstmgr fixperms in CMD to resolve any potential permission issues.

The built-in spigot download and compile function of AMP was abnormal, so I executed the spigot build tool in the backup folder. Backing up folders should not affect AMP functionality.
Since the original version of the minecraft server can use JAVA21, why is AMP’s built-in spigot download and compile function locked to the default JAVA18 of the AMP system? That’s the problem.

Running anything in any of AMP’s owned folders will cause file permission issues, since AMP runs as NETWORK SERVICE and not with your user permissions.
AMP also doesn’t lock the Java version for anything. If doesn’t seem to be working correctly, select a different version, then swap back to Java 21

I have switched and the same is true when opening a new instance.

Have you tried running build tools in a directory not owned by AMP, and uploading the resulting Jar to AMP using the web interface?

Instead of using the web interface, use copy and paste locally.

That breaks file permissions (as I’ve mentioned a couple times already)

Is there any instruction to restore it?
Use commands to restore permissions

This command here from my first message

please tell me when to use it

Are there any other instances that can be used in execution?

All instances need to be shut down
or turn off ADS

You just run the command and it fixes any file permission issues. You can run it while AMP is running.

ampinstmgr fixperms

You’re using an older version of ampinstmgr. You need to update.



Please tell me how to update ampinstmgr

I executed

ampinstmgr stopall

ampinstmgr upgradeall

you need to go to CubeCoders and redownload the .msi file and install it on top of your amp install (Do not uninstall it) to update the tools version to 2.5.0.6







‘’‘[17:48:20] [Program Info] : Starting AMP version 2.5.0.8 (Callisto), built 01/05/2024 17:36
[17:48:20] [Program Info] : Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
[17:48:20] [Core Warning] : Current time zone is set to 台北標準時間 - It is recommended you switch to UTC+0 to avoid time-zone related issues
[17:48:20] [Program Info] : OS: Windows / x86_64
[17:48:20] [Program Info] : CPU: AMD Ryzen Threadripper 7960X 24-Cores (24C/48T)
[17:48:20] [Program Info] : RAM: 261642MB
[17:48:20] [Program Info] : AMP Instance ID: 2577e4d1-524d-4be0-9f5a-718a4e868a01
[17:48:20] [Loader Info] : Loaded MinecraftModule version 1.0.0.3 by CubeCoders Limited
[17:48:20] [Core Info] : Metrics publishing is enabled at udp://localhost:12820.
[17:48:20] [Loader Info] : Loaded FileManagerPlugin by CubeCoders Limited
[17:48:20] [Loader Info] : Loaded EmailSenderPlugin by CubeCoders Limited
[17:48:20] [Loader Info] : Loaded WebRequestPlugin by CubeCoders Limited
[17:48:20] [Loader Info] : Loaded LocalFileBackupPlugin by CubeCoders Limited
[17:48:20] [Loader Info] : Loaded CommonCorePlugin by CubeCoders Limited
[17:48:20] [Core Info] : Licence Present: AMP Advanced Edition
[17:48:20] [FileManager Notice] : Using keypair with fingerprint YXT3v2vSQaJGd0nDvG2+u1ZbLOmINIYxwsxyGkjfVnU=
[17:48:20] [FileManager Info] : SFTP Server started on 0.0.0.0:2366
[17:48:20] [Webserver Info] : Websockets are enabled.
[17:48:20] [Webserver Info] : Webserver started on http://0.0.0.0:29116
[17:48:20] [Webserver Info] : RouterTimer@10Hz with 2 jobs started
[17:48:20] [Core Info] : Checking for AMP updates…
[17:48:23] [Minecraft Info] : Modpack cache is up-to-date.
[17:48:24] [Core Info] : AMP is up to date.
[17:48:26] [Core Activity] : Authentication attempt for user admin from 127.0.0.1
[17:48:29] [Core Activity] : Authentication success
[17:48:29] [Core Warning] : Slow method invocation: Login took 2520ms to complete.
[17:48:29] [Core Warning] : Slow response: Core.Login took 2525ms to complete.
[17:49:00] [Core Activity] : Authentication attempt for user admin from 127.0.0.1
[17:49:00] [Core Activity] : Authentication success
[17:49:02] [Core:Anonymous Activity] : Authentication attempt for user admin from 127.0.0.1
[17:49:02] [Core:Anonymous Activity] : Authentication success
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.FTBModpack to FTB Academy (MC 1.12.2)
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.FTBModpackNew to 1
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.SpecificForgeVersion to 46.0.14 (mc 1.20)
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.SpecificNeoForgeVersion to 20.6.7-beta
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.SpecificSpongeVersion to 1.8-2.1DEV-17
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.SpecificPaperVersion to 1.8.8
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.SpecificPurpurVersion to 1.14.1
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.FabricMCVersion to 1.20.6
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.FabricLoaderVersion to 0.15.10
[17:49:17] [API:admin Activity] : Changing setting MinecraftModule.Minecraft.FabricInstallerVersion to 1.0.1
[17:49:27] [API:admin Activity] : Updating the application.
[17:49:28] [Minecraft:admin Info] : Selected release stream is SpecificVersion…
[–rev, 1.20.6]
Loading BuildTools version: git-BuildTools-a50d932-181 (#181)
Java Version: Java 18
Current Path: D:\AMPDatastore\Instances\Minecraft01\Minecraft\spigotbuild
git version 2.41.0.windows.1
Picked up _JAVA_OPTIONS: -Xmx1024M
openjdk version “18.0.2.1” 2022-08-18
OpenJDK Runtime Environment Temurin-18.0.2.1+1 (build 18.0.2.1+1)
OpenJDK 64-Bit Server VM Temurin-18.0.2.1+1 (build 18.0.2.1+1, mixed mode, sharing)
Attempting to build version: ‘1.20.6’ use --rev to override
Found version
{
“name”: “4137”,
“description”: “Jenkins build 4137”,
“refs”: {
“BuildData”: “32d1baf2f4e0e7cd1ac22c7b2f6eb4c387e8a343”,
“Bukkit”: “ac72b19b01bcb3aef5710677b0b942e098479660”,
“CraftBukkit”: “666f091c61cefb90f6903a66e5426d15d948b1c0”,
“Spigot”: “e2c1eee02c2e00f71d78c56d6439dafc3af7dfac”
},
“toolsVersion”: 181,
“javaVersions”: [65, 66]
}
*** The version you have requested to build requires Java versions between [Java 21, Java 22], but you are using Java 18
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.
[17:50:33] [API:admin Activity] : Starting the application.
[17:50:33] [Minecraft:admin Warning] : The jar file you are trying to start is owned by DESKTOP-GQ9F6D5\enixl, but AMP is running as NT AUTHORITY\NETWORK SERVICE which may prevent the server from starting - you should use the AMP file manager to add files to your server to avoid permissions issues.
‘’’

Uninstall the program

Restart the computer
No default options Java21 can be selected successfully

Successful installation

Thanks for everyone’s help