I'm loading Talend on my mac and I'm trying to set the Java environment variables.
Talend says to set the path based on this:
export JAVA_HOME=/usr/lib/jvm/jre1.8.0_65
export PATH=$JAVA_HOME/bin:$PATH
I have several issues:
/usr/lib/JavaVirtualMachine/jdk1.8.0_144
. I'm assuming path should be exact - so no "jvm"? Also assume my jdk is correct since that is what I have. When i set the variable how do I know it takes? I've played with it and then I use printenv
but I never see what I enter.
To set this perm (when I know the path) do I open terminal and enter it like this?
export JAVA_HOME=/usr/lib/jvm/jre1.8.0_65 ~/ .profile
Thanks - New to this and trying to do a little development
You don't need an exact path.
Let java tell you where is it running from
export JAVA_HOME=`/usr/libexec/java_home`
how do I know it takes?
You need to first source ~/.profile
if you added it there, then you can echo $JAVA_HOME
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.