Set the value of a system attribute through the command line

xiaoxiao2021-03-06  43

You can set a system properties value by using the -D parameter after running the program:

Java -dtesge.home = "e: / home" testApp

The method is obtained in the program:

String Dir = System.getProperty ("esge.home");

转载请注明原文地址:https://www.9cbs.com/read-51776.html

New Post(0)