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.


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

Results 1 to 3 of 3

Thread: relative path not working

  1. #1
    Junior Member
    Join Date
    Sep 2014
    Thanked 0 Times in 0 Posts

    Default relative path not working

    relative path not working if specified folder is outside eclipse IDE, but if i put same folder in current project it is working.

  2. #2
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 698 Times in 680 Posts

    Default Re: relative path not working

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

    Yep, that happens a lot, especially when someone tries to deploy their IDE-built project to another environment. If you were to describe what the "specified folder" is, your project's relationship to it, and your ultimate requirements for the project and its resources, including the specified folder, then we might be able to offer some suggestions on what to do.

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Thanked 1 Time in 1 Post

    Default Re: relative path not working

    Think about how the relative path works. Look up the path/file api and see if you can work out a way to "see" folders/files around your project's directory. That's what I did.

Similar Threads

  1. Java relative path of a static class
    By UndersKore in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: March 5th, 2014, 03:51 PM
  2. absolute and relative path
    By viper_pranish in forum What's Wrong With My Code?
    Replies: 5
    Last Post: March 20th, 2013, 10:34 AM
  3. Read filein java using relative path
    By chinninani in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: March 20th, 2012, 10:05 PM
  4. How to get Present working Directory(Exact path) in java..?
    By smilyface in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 8th, 2012, 03:42 PM
  5. Relative path issue with Context path struts
    By chinnu in forum Web Frameworks
    Replies: 1
    Last Post: March 31st, 2011, 10:17 AM