File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System.getProperty("user.dir") not fetching the expected value.

 
venki sheshgiri
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

the below SOP is returning "." in an AIX machine , whereas I'm expecting the absolute path any Idea how/from where JVM fetches this value in a AIX machine.


public class aaa{
public static void main(String args[]){
System.out.println(System.getProperty("user.dir"));
}
}

 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where that value comes from is platform-specific, but certainly "dot" is not a particularly useful result. I don't know why it would do that, but if your main concern it just getting a meaningful value, you could try something like this:


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic