[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How do I set different JAVA_HOME for different users?

I am running debian unstable, systemd version 229.
I am learning Android development.
Android Studio uses JAVA_HOME = /usr/java/jdk1.8.0_66.
Some of the code I want to investigate uses Apache maven and that wants
JAVA_HOME = /usr/lib/jvm/java-8-openjdk-amd64

I setup user2 so that when logging in JAVA_HOME is automatically set for maven.
Except nothing I try will make it work.
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" works in a terminal, but only for that terminal.

The internet thinks that /home/user2/.config/systemd/user.conf with
will work. It doesn't.

Thanks, Jaimz

Reply to: