Portable JEdit

By ansalon5

I thought it would be useful to try and install jEdit on my usb drive in case I want to use the same editor no matter where I am. I did a little hunting and found it was quite possible with just a little bit of tweaking.

  1. Install jEdit as normal on the drive
  2. Copy the .jedit settings folder into the jedit folder
  3. create a batch file to set the JAVA_HOME variable and start jEdit pointing to that .jEdit folder.

SET JAVA_HOME = F:\Java\jdk1.5.0_09\bin
java -Duser.home=. -jar jedit.jar -settings=.jedit

the . in Duser.home=. points to jEdits root folder (F:\JEdit) and then -settings tells JEdit to use the .jedit folder for its settings. You can find the .jedit folder on the hard drives (here at school) in c:\documents and settings\%username%\.jedit

For some reason I get random java errors when I load JEdit, but it doesnt happen every time. Your guess is as good as mine with that one, but it works none the less…

5 Responses to “Portable JEdit”

  1. Sarah Says:

    Thanks Zak! I’ll give it a try.

  2. Joyce Says:

    Zak, this is a brilliant idea. I have knocked heads with jEdit for 6 months. It would be really nice to get it going correctly in just one place and then be able to use it everywhere. I will give this a try.

  3. Nathan Sutton Says:

    Nice post, I won’t be using it, but howtos like this make my world go round, most days.

  4. tt Says:

    If I have jre1.6.0_03 it will be work?
    and I must write
    SET JAVA_HOME = C:\Program Files\Java\jre1.6.0_03\bin
    java -Duser.home=. -jar jedit.jar -settings=.jedit

  5. Kof Says:

    … Great idea!, even better way is to declare local variable for removable disk.. its always changing when plugging thumb drive to different machines, so

    @echo off
    SET JAVA_HOME = %~d0\[path to your local jdk i.e. javaSDK\bin]
    java -Duser.home=. -jar jedit.jar -settings=.jedit

    //——————— >
    “%~d0″ will give you a disk on which you currently operate, then just add a path starting with “\ “.

    example: %~d0\javaSDK\bin

    It is nice keep the settings when using vary computers, thx much.
    kof

Leave a Reply