aspose file tools*
The moose likes Beginning Java and the fly likes referring to a file within src 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 » Beginning Java
Bookmark "referring to a file within src folder" Watch "referring to a file within src folder" New topic
Author

referring to a file within src folder

Neil Tomlin
Greenhorn

Joined: Nov 15, 2010
Posts: 9
    
    1
Hi,

I'm using Eclipse to write/test a program. My JAVA files are all located within the src folder within the Project.

In one of my classes I would like to access a file in my src folder using a relative URI; how can I do this?

I've tried:



None of which appear, to work. Can anyone help me with this?
Thanks
Martin Caminoa
Greenhorn

Joined: Oct 25, 2010
Posts: 5
Hi

Have you tried
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3054
    
  33

Have you divided your classes into packages?


Mohamed Sanaulla | My Blog
Neil Tomlin
Greenhorn

Joined: Nov 15, 2010
Posts: 9
    
    1
That's got it thanks

Thought I had tried it but obviously not.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: referring to a file within src folder
 
Similar Threads
javax.naming exceptions
File class questoin
object initialization
session null
Absolutepath vs Canonicalpath