Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Small problem

  Asked By: Mona    Date: Oct 05    Category: Java    Views: 628
  

How do I get the path the program is executing from?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Randall Franklin     Answered On: Oct 05

As far as I know there is nothing in the Java API which will give you the exact
name of the binary used to execute your
main class. You could use the System.getProperty("java.home") to get the home
directory for your Java installation but
that is about the extent of what is available.

Perhaps you are talking about the current working directory? This is accessible
with System.getProperty("user.dir").

 
Didn't find what you were looking for? Find more on Small problem Or get search suggestion and latest updates.




Tagged: