Build openjdk on mac "JAVA_HOME not defined correctly"

I create openjdk on a MAC and run into this problem:

Error: JAVA_HOME is not defined correctly. We cannot execute /NO_BOOTDIR/bin/java 

The OS of my mac is 10.10.2.

openjdk is

 openjdk-7u40-fcs-src-b43-26_aug_2013 

ALT_BOOTDIR

 export ALT_BOOTDIR=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home 

$ JAVA_HOME

 echo $JAVA_HOME /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home 

when I set JAVA_HOME and run "make sanity", the error is this:

 ERROR: Your JAVA_HOME environment variable is set. This will most likely cause the build to fail. Please unset it and start your build again. 

so I have to disable it, and regardless of whether I disabled it or not, an error appears.

any ideas?

thinks.

0
source share
1 answer

Before configuring the path, make sure java is installed by checking the directory

 /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home 

Type java -version and see if the version matches. If everything seems perfect so far, enter type java and set the path in your .bash_profile as follows:

 alias java="PATH_OF_JAVA_BIN_DIR" alias javac="PATH_OF_JAVAC_BIN_DIR" 
0
source

Source: https://habr.com/ru/post/918006/


All Articles