PreviousNextTracker indexSee it online !

(129/207) 2911027 - path of first untitled buffer

Error: C:\Program Files (x86)\jEdit\#Untitled-1#:Cannot save: C:\Program Files (x86)\jEdit\#Untitled-1# (Access is denied)

This pops up when you open JEdit and type in the default unsaved file that JEdit creates whenever the auto save function is called. I believe the issue is that Program Files has write restrictions, unless running in administrator mode. You can change the default location for backups, but not for this file. Please see

Perhaps the default file could be opened from our home directory or something, instead of the jedit program location

Submitted creativehavoc - 2009-12-08 - 22:36:37z Assigned nobody
Priority 5 Category None
Status Open Group None
Resolution None Visibility No


2009-12-08 - 23:23:59z
The location of the "default file" is the "working directory" of that program.
Which can be set from the shortcut properties if you run it from a shortcut.

I suppose if the installer creates a shortcut and sets the "start in directory:",
it should be the user's home directory, rather than the jedit install dir. I don't know what the windows installer does exactly.
2009-12-15 - 23:52:15z
I don't remember if i used the windows installer or the java installer, either way it would be nice to have that at least as a setting in the main settings window.

Perhaps it could also be solved by changing how the file is opened/written. Maybe there is a "proper" way to do this now on windows? Is it happening because it is running in the java virtual machine and that doesn't have write access?
2009-12-23 - 07:55:14z
What if you go into the global options - file system browser - default path -
and set it to something else? Does that make your problem go away?
2009-12-29 - 16:15:48z
Shlomy, since you just fixed a closely related bug, can you also handle this?
If "restore previously open" is disabled, then jEdit should pop up a single untitled buffer.
The directory of that untitled buffer should respect the rules of the FSB default directory but currently does not.
Can you make it so?
2009-12-29 - 17:39:52z
Actually, many of the options in that combo are not relevant.
We would need a new separate option for this, "path of first untitled buffer" which the user can select, from same pane as where one selects "restore previously open files on startup".

Demoting this to a minor bug.
2009-12-29 - 17:47:58z
jEdit uses "user.dir" (and not "user.home") as the default location of the FSB, which is also the default location of untitled buffers. According to java documentation, "user.dir" is the user's current directory, which happens to be the jEdit install directory.
I can change it to "user.home" instead of a new option. In any case, when saving an untitled buffer the user is requested to provide the location for saving (except the autosave).
2010-01-03 - 21:50:38z
Do you think it's worth an option of its own? Or should I just use "user.home" for this?
2010-03-11 - 16:01:35z
It would seem from experience rather than documentation that the user.dir is alternatively the path for the file opened on startup (windows...right-click option).

I opened a file from explorer using the right-click option and am getting errors that the untitled buffer I subsequently opened can't be saved to that directory because it's a read-only network share.

Could you not use the backup directory for the untitled autosaves to get around creating more options?