Read a properties file in java from classpath




















I need your suggestion about what can I do if I want to put the myapp folder anywhere in my drive with the same internal structure in it I described above and the program will do the job correctly.

I also need your suggestion that if I want to do the job from the jar created after building the project then can I do that without any problem? Asked by flyleaf. Then you can get it as follows:. The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails.

About Author I'm Nataraja Gootooru, programmer by profession and passionate about technologies. Java Data Structures Java 8 new features Write a program to find common integers between two sorted arrays. Checkout for Promo Codes. Program: How to load Properties file from the classpath? FileNotFoundException; import java. You are commenting using your Twitter account. You are commenting using your Facebook account. Notify me of new comments via email.

Notify me of new posts via email. There are ways to read properties file in Java from weblogic classpath One Properties file located in the weblogic domain : Drop the properties file inside the Domain directory.

Share this: Twitter Facebook. Apart from getting the properties file from classpath, you can also load from other locations directly via FileInputStream or FileReader , for example. HelloKoding provides practical coding guides, tutorials and examples series of Java, Spring Boot, Hibernate, Data Structure, Algorithms and other topics in software engineering.



0コメント

  • 1000 / 1000