Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > Phex (Cross-platform) > General Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

General Discussion For anything which doesn't fit somewhere else (for PHEX users)


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old September 3rd, 2005
Apprentice
 
Join Date: September 3rd, 2005
Posts: 5
stax is flying high
Default please work around this Java bug

Hi,

I just found Phex and dumped all my other P2P applications, cool. There is however a little problem. Phex determines the directory to save settings using this Java function:

getProperty("user.home")

this method got it all wrong, it reads a reg key to get the desktop dir and return the parent of it. On my system it returns "D:\" and I have a hard time to get along with this. My desktop dir is not within my user dir because I moved it outside, for the Windows world this is unproblematic but only if you don't use any Java applications. I must admit this might sound niggling, I'm trying to organize my files in a well thought out hierarchy.

On Windows the proper way to determine the directory where applications are supposed to save their settings is using the SHGetFolderPath Win32 API function with CSIDL_APPDATA as parameter. There is also a csidl for what a Linux user would understand as home directory (CSIDL_PROFILE) which would have been the correct implementation for getProperty("user.home").

Maybe the easiest way to get this dir with Java is expanding the %APPDATA% environment variable which Java might be capable (I don't know Java, unfortunately).

Imho applications should consider more simplicity, there's nothing easier then doing things the xcopy way but that's a very big story.

Regards,
stax

Last edited by stax; September 4th, 2005 at 03:03 PM.
Reply With Quote
 


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

BB 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
Why can't LimeWire just work already??! (Java) Savage X Windows 11 December 8th, 2006 06:05 PM
Limewire not running(REINSTALLING JAVA & LIMEWIRE DOESN'T WORK) quaid Getting Started Using LimeWire + WireShare 9 August 20th, 2006 11:38 PM
Limewire Keeps Closing Down: System prefered Java 1.4.2 over Java 1.5 CrAcKeDuP Connection Problems 13 February 22nd, 2005 04:49 AM
Exception in thread "main" java.lang.NoClassDefFoundError: lax/nl/java/option/java/st jllabres General Linux Support 6 October 17th, 2002 05:26 PM
Exception in thread "main" java.lang.NoClassDefFoundError: lax/nl/java/option/java/st jllabres General Linux Support 2 October 13th, 2002 02:06 AM


All times are GMT -7. The time now is 01:58 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.