Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #166475

Re: How do I set different JAVA_HOME for different users?

From "Thomas Schmitt" <scdbackup@gmx.net>
Newsgroups linux.debian.user
Subject Re: How do I set different JAVA_HOME for different users?
Date 2016-04-06 18:00 +0200
Message-ID <rkY26-68Y-23@gated-at.bofh.it> (permalink)
References <rkWjE-52m-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

Jaimz Fairfax wrote:
> The internet seemed to be convinced that it had to be done via systemd
> user.conf.

That opinion does not have to be wrong.
It depends on the level of software which you want to influence.
Environment variables are a very fundamental feature. Programs can
see them even if they have not been started by a shell. But of course,
the settings in the shell cannot influence what those programs see.
So it is sometimes necessary to use the init software or the desktop
to define the variable names and values for programs.

On the other side ot the spectrum, you may write wrapper programs
around the programs which you want to influence. Those wrappers
would set up the desired environment variables before starting the
desired program.
In the most simple case this would be a shell script like

  #!/bin/sh

  export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"

  android-emulator ...options...

So you can set up different environments per program rather than per
user.


Have a nice day :)

Thomas

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How do I set different JAVA_HOME for different users? Jaimz Fairfax <captain_jtf@yahoo.co.uk> - 2016-04-06 10:20 +0200
  Re: How do I set different JAVA_HOME for different users? "Thomas Schmitt" <scdbackup@gmx.net> - 2016-04-06 11:10 +0200
    Re: How do I set different JAVA_HOME for different users? SOLVED Jaimz Fairfax <captain_jtf@yahoo.co.uk> - 2016-04-06 16:10 +0200
      Re: How do I set different JAVA_HOME for different users? SOLVED Mark Fletcher <mark27q1@gmail.com> - 2016-04-06 16:20 +0200
      Re: How do I set different JAVA_HOME for different users? "Thomas Schmitt" <scdbackup@gmx.net> - 2016-04-06 18:00 +0200
        Re: How do I set different JAVA_HOME for different users? Jaimz Fairfax <captain_jtf@yahoo.co.uk> - 2016-04-07 12:50 +0200
          Re: How do I set different JAVA_HOME for different users? "Thomas Schmitt" <scdbackup@gmx.net> - 2016-04-07 14:00 +0200

csiph-web