This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
venki sheshgiri
Greenhorn
Posts: 28
  • 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
  • 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:


 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!