#5 $HOME problem on Win98

open
nobody
None
5
2003-06-04
2002-09-25
Andrew Lang
No

Versions:
Win98 SE
JEdit 4.0.3

Problem:
On Windows 98 systems, "open with JEdit" fails if
$HOME is set to anything other than the Windows
installation. There may be other associated problems,
but this is the simplest.
This causes clashes if you are using cygwin.

Reason: the server file used for security is put in
the .jedit directory. In jEdit.java, where this is initially
created, the settings directory used is specified by line
108:
MiscUtilities.constructPath(System.getProperty
("user.home"),".jedit");
On Win98, this goes to the Windows install.

In RegistryParser.cpp, where it is looked for when "Open
With" tries to connect to the server, the settings
directory used is specified by:
else // Win95/98/Me (lines 152-156)
{
if(0 == GetEnvironmentVariable("HOME",
szServerPath, MAX_PATH))

GetEnvironmentVariable("WINDIR",
szServerPath, MAX_PATH);
}

Result: open with looks in the wrong place for the server
file, fails to find it, and therefore doesn't load your file.

Workaround:
Use your windows install directory as $HOME, and point
there.

Fix: Change RegistryParser.cpp to look in WINDIR
directly, as on these systems Java user.home will be
$WINDIR not $HOME (AFAIK). So then:
else // Win95/98/Me (lines 152-155)
{
GetEnvironmentVariable("WINDIR",
szServerPath, MAX_PATH);
}

Discussion

  • Slava Pestov
    Slava Pestov
    2003-06-04

    • labels: 102668 -->