Install OpenJDK 8 but java -version still 1.7

Dear All,

I follow the guide to install OpenJDK8 in FreeBSD 10.x but I still get 1.7 from java -version? I use OpenJDK7 for more than couple years but now a software forces me to upgrade for 1.8 thus I install OpenJDK8.

What should I do to make OpenJDK8 as the default of java -version in FreeBSD 10.x?

Thank you in advance.
 
tobik is correct and that solution is fair simpler than changing /etc/make.conf. For example, if the application is started by a shell script, you can add this in to set the needed environmental variables.
Code:
JAVA_VERSION="1.8+"
export JAVA_VERSION
 
Back
Top