How can I get System variable value in Java? October 15, 2022 by Tarik Use the System.getenv(String) method, passing the name of the variable to read.