V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
saskue
V2EX  ›  Java

mac 安装 maven 一直提示报错,好像是 JAVA_HOME 路径有问题?但是终端 输入 Java -version 没问题啊 。jdk 1.8 maven 3.5。

  •  
  •   saskue · Sep 3, 2018 · 2743 views
    This topic created in 2800 days ago, the information mentioned may be changed or developed.

    一直报如下错误。。

    The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE

    profile 配置如下

    #Setting PATH for JAVA 1.8.0_131 export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home" export PATH="$JAVA_HOME/bin:$PATH" export M2_HOME="/Users/a1/Downloads/apache-maven-3.5.4" export M2="$M2_HOME/bin" export PATH="$M2:$PATH" export PATH="/usr/local/mysql/bin:$PATH

    弄一天了,希望各位大佬帮忙看一下,谢谢啦

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2658 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 04:05 · PVG 12:05 · LAX 21:05 · JFK 00:05
    ♥ Do have faith in what you're doing.