Results 1 to 2 of 2
- 03-14-2010, 05:32 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 1
- Rep Power
- 0
Writing to a file in a different folder
Hey guys.
Say I have two folders in my project:
src/main/java
src/main/resources
And I have code in the src/main/java folder, and this code wants to load a file that is in the src/main/resources folder. How would I go about doing that without using the location like this "C:\Documents And Settings\Workspace..."
Isn't there some way to use that path instead? Like this "/ProjectName/src/main/resources"?
So my code looks like this:
FileInputStream fis = new FileInputStream("what goes here?");
Thanks
- 03-14-2010, 05:58 AM #2
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
Similar Threads
-
Moving file to another folder
By Aiden in forum New To JavaReplies: 1Last Post: 03-03-2010, 07:47 AM -
Im writing to a file and i want to skip lines while writing to a text file.
By Broden_McDonald in forum New To JavaReplies: 1Last Post: 02-27-2010, 01:29 AM -
need to get the file name from folder
By naveen.dpt2007 in forum New To JavaReplies: 2Last Post: 09-04-2009, 06:57 PM -
Copy a file to a folder.
By leric in forum New To JavaReplies: 7Last Post: 07-29-2009, 05:11 AM -
[SOLVED] how to reading binary file and writing txt file
By tOpach in forum New To JavaReplies: 3Last Post: 05-09-2009, 11:31 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks