Skip to content
Advertisement

Java giving “Could not successfully run git” when trying to compile BuildTools jar

I am trying to install BuildTools 1.18 with Java 18 in linux, following this tutorial. When I try to compile with java -jar BuildTools.jar --rev latest as instructed, it gives me this error:

Could not successfully run git. Please ensure it is installed and functioning. Cannot run program "git" (in directory "."): error=2, No such file or directory

Here is the full output (before the error):

Loading BuildTools version: git-BuildTools-1fbeb7f-147 (#147)
Java Version: Java 18
Current Path: /home/jackpy/spigot/.

I have git configured and tried running git init, but that didn’t change anything.
Why is this happening and how do I fix it? I am using Debian 10.

Advertisement

Answer

I have figured it out. I was using the OpenJDK snap instead of the APT package. I installed the APT package, and it worked.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement