Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to load class path for .properties file

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to load class path for .properties file

    Hello, i have a .properties file in my spring porject out side src folder, i want to keep away from src folder
    i gave complet classpath as <property name="location" value="classpath:/home/dev06/filesystem/config/Information.properties" />

    and also <property name="location" value="classpath:filesystem/config/Information.properties" />- both of them are nt working
    i am getting a nested exception

    Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [resource/Information.properties] cannot be opened because it does not exist

    any help will be appreciated


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: How to load class path for .properties file

    This thread has been cross posted here:

    http://www.java-forums.org/spring/54375-how-give-class-path-properties-file.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting

    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. how to get value path file from jsp form- input type file
    By meeGoreng in forum JavaServer Pages: JSP & JSTL
    Replies: 4
    Last Post: October 4th, 2011, 12:05 AM
  2. Paramaters to update properties file
    By d0nal in forum Java Theory & Questions
    Replies: 1
    Last Post: September 14th, 2011, 11:17 AM
  3. Structured Properties File?
    By moka in forum Java Theory & Questions
    Replies: 7
    Last Post: October 19th, 2010, 11:14 AM
  4. Accessing Properties File
    By java_mein in forum Java Servlet
    Replies: 5
    Last Post: May 14th, 2010, 02:44 AM
  5. how to load a class and type cast to that class?
    By chinni in forum Object Oriented Programming
    Replies: 2
    Last Post: November 9th, 2009, 10:18 AM