简体   繁体   中英

External Jar file import with property

I am new to java development and need a suggestion.

I need to import some external jar file into eclipse to use the methods. However that external file has a property file from which it gets the configuration. Now I am able to include the external jar file into my project but cannot include the properties file. it is throwing error when I add property file in the external file library.

Could you please suggest how to achieve this?

Add the property file to the class path, and keep it externally. Many libraries use property files to configure themselves. For example, logback and log4j do.

java -cp propertyfile

Use the -cp parameter when launching the program. Refer to the documentation of the external library you are using for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM