Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

find the path where my program is running  RSS feed

 
nandireddy sreekanthreddy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

how to find the directory(i mean total path) where my java programme is running (when i run that programe it has to tell that )
thanks in advance
sreekanth
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<code><pre>System.out.println("Working directory: " + new File(".").getAbsolutePath());</pre></code>
 
nandireddy sreekanthreddy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello Jim Yingst
thanks a lot
bye
sreekanth
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!