0

I could use System.getenv(String name) to get the environment variable, I would ask how to set environment variable with java?

I didn't find such method defined in the System class

Tom
  • 5,848
  • 12
  • 44
  • 104
  • As that environment variable would only be propagated to child processes of your Java program anyway, such a method would essentially be useless. –  Jul 21 '20 at 05:56
  • You need yo use System.setProperty(key, value) – Sounak Saha Jul 21 '20 at 05:56

0 Answers0