Java eclipse referencing files in project using relative paths -
i trying upload web using 1 of apache's client libraries. having trouble locating resource file upload. project setup looks this:
root/src/a/b/c/d/program.java
root/resource/resourcefile.txt
i wondering string path referencing resource file program.java?
file f = new file("what path go here?");
thanks in advance.
- eclipse (by default) not include file in built project.
- the project path information eclipse environment not available in built project
if run in eclipse, display base path of application.
find out with
file f = new file("."); system.out.println(f.getabsolutepath());
tips :
- read documentation of java api
- for questions write minmal test programs
Comments
Post a Comment