Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get default directory

 
qionghua yang
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Jbuilder4. I would like to get the default directory. Does anyone know how to get the default?
Thanks!
qionghua
 
Mark Savory
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using JBuilder35(maybe it behaves the same in JBuilder 4) and the default directory is /JBuilder35/bin - meaning: if I was to read a properties file without specifing a directory, this is where it would be read from.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can find what your jvm conciders the current working directory by using System.getProperty("user.dir")

------------------
Hope This Helps
Carl Trusiak
 
qionghua yang
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot, Mark and Carl. I try and I get what I want. Thanks!
qionghua
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic