aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Problem on declare specific path for folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem on declare specific path for folder" Watch "Problem on declare specific path for folder" New topic

Problem on declare specific path for folder

Tan Joey

Joined: Jun 23, 2011
Posts: 8

I am doing a project,i had created a folder in the project source folder and would like to make a file to write into this specific folder that i had created. But i don't to hardcode this specific foder's path and i have try some way to make this function work like 'String path =System.getProperty("user.dir") + "/src/<specific folder name>";' but it didn't work and pop up error message that said folder cannot be found. any help will be appreciated thank you.
Vijay Tidake
Ranch Hand

Joined: Nov 04, 2008
Posts: 146


The best way to do this is

Create one property file( in your classpath(in src folder) having the folder path defined in it

Load this file as Resource

Get the path variable using

Hope this helps

The important thing is not to stop questioning.Curiosity has its own reason for existing.
I agree. Here's the link:
subject: Problem on declare specific path for folder
Similar Threads
run problem on Eclipse
How to debug jsp page
Eclipse, OEPE plugin installed cannot deploy application
JavaMail Session cannot be resolved to a type
Run Servlet In Eclipse