So, according to that, we should put our export statement into ~/.bashrc. An 'interactive non-login shell' is a shell which is started from within a GUI for example. By default the former is executed for what is called 'interactive non-login shells' while the latter is used for 'login shells'.Ī 'login shell' is exactly what you'd expect: a shell which is started after login via command line.
Simplified, you can define it in two files: either ~/.bashrc or ~/bash_profile.
Ok, first of all, we have to make clear where to set JAVA_HOME.