This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes get default directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "get default directory" Watch "get default directory" New topic

get default directory

qionghua yang
Ranch Hand

Joined: Oct 31, 2000
Posts: 68
I am using Jbuilder4. I would like to get the default directory. Does anyone know how to get the default?
Mark Savory
Ranch Hand

Joined: Feb 08, 2001
Posts: 122
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

Joined: Jun 13, 2000
Posts: 3340
You can find what your jvm conciders the current working directory by using System.getProperty("user.dir")

Hope This Helps
Carl Trusiak

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
qionghua yang
Ranch Hand

Joined: Oct 31, 2000
Posts: 68
Thanks a lot, Mark and Carl. I try and I get what I want. Thanks!
I agree. Here's the link:
subject: get default directory
Similar Threads
POST and GET method
Pls suggest the IDE which consumes less memory
Deciding user dir when in root
Swing/ JFC/ Java script
chapter 10 question number 11 k&b book (on jar files)