Setting Java home enviroment variable in OSX Mavericks

前端 未结 2 1411
故里飘歌
故里飘歌 2021-01-27 08:56

I am having issues with my Java path.

I have installed the latest version of Java 1.7.0_51. When I open the Java control panel it tells me \"Your system has the

相关标签:
2条回答
  • 2021-01-27 09:17

    Check whether there is an old version existed in the path

    echo $PATH
    

    Then set the java 1.7 bin directory.

    export PATH=/usr/libexec/java_1.7_home/bin:$PATH
    

    Then try to type in "java -version" in terminal to check the version

    0 讨论(0)
  • 2021-01-27 09:38

    Ok, I think this must be specific to me. As above the Java control panel was saying that java 7 was installed. Also when i tried

    /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
    

    I would get

    java version "1.7.0_51"
    Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
    

    But no mater what way I installed the JDK it would not work. It just didn't seem to appear anywhere on my machine. I still don't know why, but uninstalling (by simply deleting the 1.6 folder) the existing Java 6 from my machine and once again installing Java 7 JDK eventually fixed it.

    Please give the up-votes to @diaz994 above.

    0 讨论(0)
提交回复
热议问题