V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
saskue
V2EX  ›  程序员

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

  •  
  •   saskue · Sep 4, 2018 · 4577 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

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

    3 replies    2021-03-19 11:00:29 +08:00
    saskue
        1
    saskue  
    OP
       Sep 4, 2018
    有人遇到类似的问题吗 233
    saskue
        2
    saskue  
    OP
       Sep 4, 2018
    有人遇到类似的问题吗
    gorillaL2sll
        3
    gorillaL2sll  
       Mar 19, 2021
    解决了么
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2658 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 04:05 · PVG 12:05 · LAX 21:05 · JFK 00:05
    ♥ Do have faith in what you're doing.