Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-28-2007, 10:03 AM
Member
 
Join Date: Jun 2007
Posts: 5
FrankyDee is on a distinguished road
finding Operating System specific data
Hi there,

I'm a newbie to Java so please, bare with me.

I have to write an application that is going to store user preferences.
To store them, I need to find out the user's home directory on any platform this app can run on (Windows, Unix, Linux)

For example, on Windows, I'd need to know the user's My Documents folder

Can anybody help ?
Franck
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-28-2007, 12:18 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Check getProperties() method in this class. "user.home" system property is what you can obtain from Java. This will work for all OSes supported.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 09-28-2007, 04:27 PM
Member
 
Join Date: Jun 2007
Posts: 5
FrankyDee is on a distinguished road
Thanx a lot
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I modify a specific component within a active internalframe? LearningJavaASAP AWT / Swing 1 04-24-2008 07:35 PM
Main method throwing specific Exception bugger New To Java 3 01-22-2008 04:08 AM
Select specific cell Echilon New To Java 1 01-01-2008 08:47 AM
Rejecting connections from a specific IP javaplus Networking 2 12-21-2007 03:28 PM
Tracking Operating System Mansi Networking 2 07-23-2007 02:41 PM


All times are GMT +3. The time now is 01:52 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org