Java read jar package configuration file

Source: Internet
Author: User

Preconditions: Run Java programs using Java-jar Xxx.jar, where some of the code needs to read the configuration files in the jar

Problem Description:

Discovery could not read to the configuration file


Solution Ideas:

1. The configuration file is not hit in the jar package

2. The configuration file is corrupted and cannot be read

3. Code error reading the configuration file


Final Solution:

The use of new Fileinputstrem (file) cannot be read to the configuration file in the jar, but it can be resolved by commenting some code. This link http://blog.csdn.net/b_h_l/article/details/7767829 's article has been very clear

Java read jar package configuration file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.