Making sure JAVA_HOME is correctly set

前端 未结 6 570
北荒
北荒 2020-12-12 22:49

Pretty new to Java and also to Mac ... I want to make sure JAVA_HOME is set so in other programs I can use its path. So I did some Googling and here is what I got:

I

6条回答
  •  Happy的楠姐
    2020-12-12 23:08

    I had this problem after setting JAVA_HOME with jenv. You can solve the problem by editing file

    /Applications/Eclipse.app/Contents/Info.plist
    

    Just set path to your version of java by uncommenting / editing appropriate part of file. For AdoptOpenJDK installed with homebrew it looks like this:

    Eclipse
    
        -vm/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java
        
            -keyring
        ~/.eclipse_keyring
    
    

提交回复
热议问题