Skip to content

Instantly share code, notes, and snippets.

@ksundong
Created April 20, 2020 13:40
Show Gist options
  • Select an option

  • Save ksundong/6977ca8b266bf6afdb2ba1e817815f5e to your computer and use it in GitHub Desktop.

Select an option

Save ksundong/6977ca8b266bf6afdb2ba1e817815f5e to your computer and use it in GitHub Desktop.
Mac/Linux에서 환경변수 등록하고 자바에서 확인하기

환경변수 확인

$ echo ${환경변수명}

홈디렉토리에서...

$ vi .bashrc
맨 밑으로 (G)
export {환경변수명}=""

esc -> : -> x -> enter

$ source .bashrc
System.getEnv("환경변수명");

null이 리턴되는 경우 IDE를 껐다가 켜서 확인해 볼 것!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment