从源代码构建 QuestDB 时关于 javac 的警告

Warnings about javac when building QuestDB from source

我正在尝试在新安装的机器上从源代码构建 QuestDB,但我收到有关 javac 的警告:

[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ questdb ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1292 source files to /home/pi/questdb/core/target/classes
[WARNING] Unable to autodetect 'javac' path, using 'javac' from the environment.

有什么解决方法?

看起来 JAVA_HOME env var 没有设置。您可以通过 运行 在您的 shell 中检查以下内容:

echo $JAVA_HOME

在 macOS 上,我有以下内容:

/Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home

检查运行时 maven (brew install) 正在引用:

mvn --version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/me/maven/apache-maven-3.6.3
Java version: 11.0.9, vendor: Oracle Corporation, runtime: /usr/local/Cellar/openjdk@11/11.0.9/libexec/openjdk.jdk/Contents/Home

~/.zshrc中(你可以使用~/.bashrc)我设置了JAVA_HOME

export JAVA_HOME="/Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home"

然后再次尝试构建:

source ~/.zshrc
mvn clean package -DskipTests -P build-web-console,build-binaries