![]() |
|
Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
General Discussion For anything which doesn't fit somewhere else (for PHEX users) |
![]() |
| LinkBack | Thread Tools | Display Modes |
| |||
![]() 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. |
| |||
![]() Nobody replying indicates a little bit windows users aren't really first class citizens here. Quite many people can't get along with applications that don't integrate with the system properly. I did some research for my own application, please read here . Quite a few people were seriously pissed of by applications that behave badly. You are only saving in the home dir when the desktop dir is within the home dir which is often not desirable and even if it's within the home dir you still doing it wrong because applications are not supposed to save in the home dir directly but in a sub dir called application data. The system provides various ways to get the path of application data directory. I live in Weilimdorf btw. ![]() Last edited by stax; November 30th, 2005 at 05:09 AM. |
| |||
![]() There have been a lot of changes to Phex since your first post, and GregorK will, no doubt pick up on this post. If he misses it for some reason send him a pm. As you can see I'm a mac user so this makes little sense to me ![]() |
| ||||
![]() I'm a Mac-User too, and the main-dev is a bit busy programming sometimes, so please don't gripe it, that he seems to have overlooked your post. Besides: GregorK is Windows-User, so if you can contribute some ideas how to select the best folders in Windows without too much hassle for Java, I'm sure he'll be quite interested.
__________________ ![]() -> put this banner into your own signature! <- -- Erst im Spiel lebt der Mensch. Nur ludantaj homoj vivas. GnuFU.net - Gnutella For Users Draketo.de - Shortstories, Poems, Music and strange Ideas. |
| |||
![]() sorry for missing this thread... This bug is not very easy to work around... not even at sun it is quite clear what is the best way to determine the correct directory across the different window plattforms. To store the files in the application directory is also not a very good way when looking at systems used by multiple users. Actually I currently have no idea how to solve this usefully. For your problem you can work around by starting Phex with the option: -c <path> Copy your existing configuation files to the new location before starting. |
| |||
![]() Thanks and sorry if I was too much of a pain. I feel much better now and I hope the other Java developers I surely will point to this topic will provide a solution as well. If I ever find a solution (by now I know only Visual Studio languages) I'll report back. |
![]() |
| |
![]() | ||||
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 |