Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Baritone 1.16.3 fails to build

sworosh opened this issue ยท 5 comments

commented

Some information

Operating system: macOS Catalina 10.15.3
Java version: 12.0.2 2019-07-16
Minecraft version: 1.16.3
Baritone version: 1.6.1
Forge mods (if used):

Exception, error or logs

`% ./gradlew build

Task :buildSrc:compileJava FAILED
/Users/me/baritone/buildSrc/src/main/java/baritone/gradle/task/CreateDistTask.java:22: error: package javax.xml.bind does not exist
import javax.xml.bind.DatatypeConverter;
^
/Users/me/baritone/buildSrc/src/main/java/baritone/gradle/task/CreateDistTask.java:80: error: cannot find symbol
return DatatypeConverter.printHexBinary(SHA1_DIGEST.digest(Files.readAllBytes(path))).toLowerCase();
^
symbol: variable DatatypeConverter
location: class CreateDistTask
Note: /Users/me/baritone/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':buildSrc:compileJava'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s`

Linux: ~/.minecraft/logs/

Windows: %appdata%/.minecraft/logs/

Mac: /Library/Application\ Support/minecraft/logs/

How to reproduce

% cd baritone
% ./gradlew build

Modified settings

To get the modified settings run #modified in game

Final checklist

  • I know how to properly use check boxes
  • I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
  • I have included logs, exceptions and / or steps to reproduce the issue.
  • I have not used any OwO's or UwU's in this issue.
commented

@GameCenterJerry Which version of Java are you using to compile?

Reason I ask is this issue is normally because the Java distribution your using may not have the needed javax classes.
As a reminder, only Java 8 (Oracle/AdoptOpenJDK) have been tested to fully work with Baritone compiling on my end

commented

I WAS using java 12 but I simply ran a command that switched to java oracle SE 8 which started working. It's currently executing at the moment so I won't close it yet, I want to see the end result to see if it works or not.

commented

@CDAGaming running one of these commands
`# List Java versions installed
/usr/libexec/java_home -V

Java 11

export JAVA_HOME=$(/usr/libexec/java_home -v 11)

Java 1.8

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

Java 1.7

export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)

Java 1.6

export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)`
Worked. I switched versions in my current terminal window.

commented

Happy to help! Don't forget to close this issue if it is indeed resolved now ๐Ÿ‘

commented

It worked. The issue was the java version. I might create a new enhancement with the common problems and to help other not face the same problems I had. Thanks for helping!

CLOSED