What this basically means is that when a Java virtual machine tries to figure out a user’s home directory it looks at the desktop location and just jumps up one directory level. Normally the desktop directory is something like C:\Documents and Settings\farra\Desktop which means the JVM thinks your user home is C:\Documents and Settings\farra. However, in some cases, like my workplace, desktop directories are linked to a remote file server. In this case, my Java user home setting points to the remote file server instead of my local PC which is a BAD THING. The only way to change it is to either (1) change the desktop location or (2) always pass a override parameter to the virtual machine such as java -Duser.home=%USERPROFILE% ... . Of course, sometimes it’s impossible to do either of those things such as when there’s a network requirement to have desktop folders be on a fileserver or when you’re launching Java WebStart application and can’t pass an override parameter.
What’s worse is that this is not a new bug. It’s been around since version 1.3 at least. I just found out today that it hasn’t been fixed in Java 1.5 and a department here just released a new WebStart based application. It’s not a hard bug for Sun to fix, so I don’t understand why it hasn’t been handled. If anyone has any good experience with work arounds for WebStart apps hitting this bug, I’d love to hear them. All Sun provides is an FAQ on editing the Windows registry. Needless to say, that is a less then optimal solution.
Commentary