Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting the File from Current directory

 
Chiranjeevi Kanthraj
Ranch Hand
Posts: 290
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i have a file in folder called /util/xx.txt

my code is running in /run/runing.java

how can i get the file xx.txt from my code
[ June 08, 2008: Message edited by: Chiru Raj ]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using an absolute path: new File("/util/xx.txt")
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic