In FreeBSD packages, the script shell must be installed in / usr / local / bin / java, which knows about the different installed JVMs and their JAVA_HOME, etc. Did you accidentally download tarball instead of a package?
What gives pkg_info | grep jdk pkg_info | grep jdk ?
source share