w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
What is the best way of reading configuration parameters from configuration file in Java?

It will be only one time cost if you are putting them in a property file and reading the file at the start of your application and initialize all the parameters as system parameters(System.setProperty) and then define constants in your code like

public static final String MY_CONST =
System.getProperty("my.const");

But ensure the initialization at start of your application before any other class is loaded.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.