Portable jEdit
Submitted by Wednesday, 11 February, 2009 - 19:34
on
Having used jEdit for years, I wanted to make it available to my students. We use MacOS X and they all have USB drives. jEdit runs fine from the external drive of course, but it saves its settings by default in the user's home folder. My problem was that the Guest account gets purged on logout. I didn't want to create user accounts for every student or set up roaming accounts. I knew that it was possible to specify a custom settings folder with a command line switch but I needed a path relative to the jEdit app. I began with the MacOS X package downloaded from jEdit.org. After poking around in the info.plist (right-click jEdit, select Show Package Contents), I found a key for command-line arguments. I could not successfully feed a relative path. Setting WorkingDirectory to $APP_PACKAGE and adding -Duser.home=../ under VMOptions allows this to work. At this point I could feed an argument for a settings folder that sits alongside the jEdit app. I named my folder jEdit_settings.
Here is the relevant section from my Info.plist file
WorkingDirectory
$APP_PACKAGE
VMOptions
-Xmx192M -Duser.home=../
Arguments
-background -settings=jEdit_settings
I've documented this on my website - http://perryjohnson.net/web/portable-jedit.html
If there is a better way of doing this, I'd love to hear it.
I won't say I've tried every text editor but it seems like I have. jEdit always wins the battle.