jEdit Community - Resources for users of the jEdit Text Editor
jEdit Lite: running jEdit from a floppy disk
Submitted by jgellene on Saturday, 17 November, 2001 - 17:13
First, I decided that I would do without the help documentation and the "Tip of the day" feature. Opening jedit.jar with a zip file utility, I removed all of the files in the /doc directory and all of the HTML tip files. The resulting jedit.jar shrunk to 986KB. Not bad for a start.

Next, I looked at the edit modes in the /modes directory. What would I really need on the road? I narrowed the selection down to the following: beanshell, c, cplusplus, html, java, javascript, perl, php, python, text, xml and xsl. The largest price paid was for the php mode: the file was 97KB, over four times the size of the next largest. Maybe someday we'll have a php-lite mode, but I decided to keep it in.

The catalog file in the /modes directory had to be edited to reflect the reduced selection of modes. I also added .sgml and .dtd to the xml mode specification and deleted the reference to the "first line" element. The /modes directory was now reporting a total size of 172KB.

Macros were next. I reduced the count from about 40 to 23. I also added a one-line macro, No_Help.bsh, which I associated to the F1 key:

Macros.error(view,"Help is not available for this version of jEdit.");

I also kept the two installation startup scripts in the /startup directory

The "lite" version of the /macros and /startup directories took up another 60KB.

Now for the hard part: what to about plugins. I decided that shell access and a working Error List facility were the essentials for a portable version of jEdit version. Adding EditBus.jar, Console.jar and ErrorList.jar added another 174KB to the floppy disk's contents.

The final task was to create a properties files that would smooth over some of the rough edges I created. It would be read at startup to do three things:
  • prevent the help shortcut key from triggering an application error by invoking a missing help file,
  • hide the "tip of the day" display, and
  • make sure that the plugins were properly placed.
Here is the file light.props that I placed in the /properties directory:

help.shortcut=
Misc/No_Help.shortcut=F1
tip.show=false
error-list.dock-position=bottom
hypersearch-results.dock-position=bottom
log-viewer.dock-position=bottom
console.dock-position=bottom


That was it - no hacking source code, no rebuilding. Total unused space on the floppy: 20.5 KB. Oh yes, and it worked!

There's a few more details to address. There's no room for user settings on the floppy. The application creates a user settings directory tree at startup if it doesn't find one, but it doesn't clean up after itself. So when you go visiting another computer and run your floppy, you may have to designate a -settings location on the command line where you have permissions to create directories and write files. You should also be polite and clean up the settings directory when you are done.

You could also put a group of shortcut assignments in another .props file in the /properties directory to personalize your portable version. And, of course, no one has figured out how to put a Java Runtime Environment on a floppy disk, so you will have to have one waiting for you. Nevertheless, the result of this exercise was a portable, functional copy of the latest stable version of jEdit. By following these procedures, you will never have to do without your favorite cross-platform text editor.
User login
Browse archives
« December 2017  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
33%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1092
Syndication
file   ver   dls
German Localization light   4.4.2.1   50872
Context Free Art (*.cfdg)   0.31   41060
JBuilder scheme   .001   16943
ColdFusion scheme   1.0   16527
BBEdit scheme   1.0   16521
R Edit Mode - extensive version   0.1   14766
Advanced HTML edit mode   1.0   13996
Matlab Edit Mode   1.0   13926
jEdit XP icons   1.0   13368
XP icons for jEdit   1.1   12396