I'm seeing some discrepancies between commands I execute on my plain old OS terminal (I'm using a Mac) and the terminal that ships with IntelliJ (the version I'm using is Ultimate 2019.2).
For one thing, Maven isn't recognized in IntelliJ, even though I've set the Maven home directory correctly in the IntelliJ settings to /opt/apache-maven-3.6.0
instead of the bundle that ships with IntelliJ. I've also ensured that the JDK in IntelliJ is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/bin/java
.
OS terminal:
$ which java
/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/bin/java
$ which mvn
/opt/apache-maven-3.6.0/bin/mvn
$ mvn -v
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T13:41:47-05:00)
Maven home: /opt/apache-maven-3.6.0
Java version: 1.8.0_211, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
IntelliJ terminal:
$ which java
/usr/bin/java
$ mvn -v
bash: mvn: command not found
Can someone explain these discrepancies?