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.
- Install jEdit as normal on the drive
- Copy the .jedit settings folder into the jedit folder
- 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…
April 9, 2007 at 1:03 am
Thanks Zak! I’ll give it a try.
April 9, 2007 at 1:08 pm
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.
April 23, 2007 at 8:14 pm
Nice post, I won’t be using it, but howtos like this make my world go round, most days.
January 9, 2008 at 2:21 pm
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
March 26, 2008 at 2:34 pm
… 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