File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes System.getProperty( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "System.getProperty("user.dir") not fetching the expected value." Watch "System.getProperty("user.dir") not fetching the expected value." New topic
Author

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

venki sheshgiri
Greenhorn

Joined: Jan 01, 2006
Posts: 28
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

Joined: Jan 03, 2004
Posts: 6109
    
    6

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
 
subject: System.getProperty("user.dir") not fetching the expected value.