halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
455 stars 86 forks source link

asdf global java xxx runs, but it doesn't stick #118

Closed paul-hammant closed 3 years ago

paul-hammant commented 3 years ago
$ asdf global java openjdk-14.0.1
Pauls-Air:demo-jbehave-climate-tck paul$ java --version 
openjdk 15 2020-09-15
OpenJDK Runtime Environment AdoptOpenJDK (build 15+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15+36, mixed mode, sharing)

What could the causes of that be?

Then to complicate it further:

$ mvn --version 
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.6", arch: "x86_64", family: "mac"
halcyon commented 3 years ago

If I recall correctly, maven uses JAVA_HOME to locate the jdk. What are the results of echo $PATH, which java, and asdf which java?

paul-hammant commented 3 years ago

Maven uses ~/.mavenrc. Since filing this issue I've uninstalled the asdf (its own challenge to find a canonical clear how) and now hand-maintain ~/.mavenrc