â caner@vegan ~ echo $JAVA_HOME
â caner@vegan ~ echo $PATH
/home/caner/bin:/home/caner/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
â caner@vegan ~
this is now empty.
â caner@vegan ~ export JAVA_HOME=/usr/local/java/jdk1.8.0_171
â caner@vegan ~ export PATH="$PATH:$JAVA_HOME/bin"
â caner@vegan ~ echo $JAVA_HOME
/usr/local/java/jdk1.8.0_171
â caner@vegan ~ echo $PATH
/home/caner/bin:/home/caner/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/java/jdk1.8.0_171/bin
â caner@vegan ~
now i set values. BUt after minutes, it keeps getting unset. As first codes show.
Why is that?
it is ubntu 16.04.
I run some ant commands for hybris but i am not sure if it is about it.
â caner@vegan ~ gnome-terminal Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 8
i downloaded jdk 8 only and gave its path. – CursedChico Jun 06 '18 at 14:17source /etc/environment
line to~/.zshrc
(because, well, zsh not bash). I've seen a question some days ago regarding the error you described, just search on AskUbuntu. – danzel Jun 06 '18 at 14:21export PATH=$HOME/bin:/usr/local/bin:$PATH
source /etc/environment
– CursedChico Jun 06 '18 at 14:25then again export path and javahome and then
source ~/.zshrc` but it did not work again when i opend new terminal tab :(/etc/environment
(add theexport PATH=...
lines to that file). Then you add thesource ...
line to~/.zshrc
. Now if you open a new terminal, the variables should be set. – danzel Jun 06 '18 at 14:31etc/profile
thoseexport JAVA_HOME=/usr/local/java/jdk1.8.0_17 export PATH=$JAVA_HOME/bin:$PATH
then source it and zsh but even in that terminal, jvahome is still empty. Before, i added to zshrc thissource /etc/environment
then path became this$ echo $PATH /usr/local/java/jdk1.8.0_17/bin:/usr/local/java/jdk1.8.0_17/bin:/usr/local/java/jdk1.8.0_17/bin:/usr/local/java/jdk1.8.0_17/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/....
. i did source to zsh,env and profile. After i source enviroment, javahome is being deleted. – CursedChico Jun 06 '18 at 14:44