Results 1 to 2 of 2
  1. #1
    kewlkeny is offline Member
    Join Date
    May 2011
    Rep Power

    Default How to give class path for .properties file

    Hello evryone,i am newbie i have a small query
    i have added .properties file, and in my configuration.xml when i enter code
    <bean id="placeholderConfig"
    class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
    <property name="location"
    value="" />

    this is working, as i have mentioned my file inside the src/main/resources

    now my query is i dont want this .properties file to be inside the src folder, i want to keep this outside such that when i make jac file this will not be loaded, and i can easily give property info,

    so i added a folder config in my project along with src, target (Maven project) in the config folder i added the .properties file and i gave the classpath as classpath:/home/dev06/filesystem(prjct name )/config/ - and i am getting an exception as nested exception - could nt find the .properties file and even tried by giving class[path : filesystem(prjct name)/config/

    correct me if i am wrong-

    i even tried by adding my folder as classfolder to my eclipse project, but still i am getting the same

    can any one please help me :)

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power

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

    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

Similar Threads

  1. Replies: 0
    Last Post: 01-22-2010, 01:01 PM
  2. Path for properties file and license
    By aleks.farrier in forum Advanced Java
    Replies: 0
    Last Post: 08-03-2009, 03:12 PM
  3. [SOLVED] How to give the path when there exists spaces
    By jazz2k8 in forum Advanced Java
    Replies: 4
    Last Post: 05-20-2009, 08:32 AM
  4. Weird path problem when reading properties file
    By jerry_popperq in forum New To Java
    Replies: 0
    Last Post: 03-18-2009, 04:32 PM
  5. how can i give a file path to java stream ?
    By sheckoo in forum New To Java
    Replies: 2
    Last Post: 11-05-2008, 09:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts