Skip to content
Advertisement

Tag: environment-variables

JAVA_HOME incorrectly set. How to reset it?

When I try to run mvn (Apache Maven, that is), I keep getting error “JAVA_HOME” not set. I follow the instructions to set the JAVA_HOME variable as follow; In the terminal: That looks correct, right? Then how come I still getting the incorrect JAVA_HOME error? Answer JAVA_HOME typically should only include the folder that contains the bin folder. So in

Using sed to get an env var from /proc/*/environ weirdness with x00

I’m trying to grovel through some other processes environment to get a specific env var. So I’ve been trying a sed command like: sed -n “s/x00ENV_VAR_NAME=([^x00]*)x00/1/p” /proc/pid/environ But I’m getting as output the full environ file. If I replace the 1 with just a static string, I get that string plus the entire environ file: sed -n “s/x00ENV_VAR_NAME=([^x00]*)x00/BLAHBLAH/p” /proc/pid/environ I

How can I add a default include path for GCC in Linux?

I’d like GCC to include files from $HOME/include in addition to the usual include directories, but there doesn’t seem to be an analogue to $LD_LIBRARY_PATH. I know I can just add the include directory at command line when compiling (or in the makefile), but I’d really like a universal approach here, as in the library case. Answer Try setting C_INCLUDE_PATH

Advertisement