jEdit Community - Resources for users of the jEdit Text Editor
Make Jedit run on JDK on removable USB drive without changing PATH (batch file, maybe?)
Submitted by sidewalking on Wednesday, 19 April, 2006 - 13:29
Hi all,

I searched a bit but couldn't find the answer, so here goes:

Here is my situation. I have an old JRE 1.3 on my work computer and one of our programs will not work with anything newer than this (don't ask). Needless to say, I am not allowed to install any Java JRE (and I presume JDK/SDK either).

However, I copied my install folders of the newest JDK and JRE for 1.5.0_6 to my USB drive (path is E:\Java\jdk1.5.0_06) and I can run Netbeans, BlueJ and jGRASP just fine because those prompt you to browse for a JDK to use.

This is the problem I run into: I want to use Jedit, not just as an editor but with the compiler functionality, and I wold prefer running it from my USB Java 1.5 JRE rather than the antiquated 1.3 on my desktop machine. Can I do this? I know how to set the path but I do not want to interfere with the functionality of that work program. Is there a batch file I can use to start it that will invoke it to start in the E:\Java\jdk1.5.0_06\bin or E:\Java\jre1.5.0_06\bin folders instead of the system path that directs to JRE 1.3?


Many thanks! Smiling

Scott
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
jedit.bat
by Robert Schwenn on Wed, 19/04/2006 - 19:43
rem jedit.bat
rem ... sets home directories of java and jedit only for jedit if it is started with this batch file
@echo off

set JAVA_HOME=C:\Programme\Java\jdk1.5.0_06
set JEDIT_HOME=G:\Tools\jEdit_43pre3
set JEDIT_SETTINGS=...directory on USB...

start %JAVA_HOME%\bin\javaw.exe -jar %JEDIT_HOME%\jEdit.jar -reuseview %*

rem try this (instead of the command above) for using settings directory on USB-stick:
rem start %JAVA_HOME%\bin\javaw.exe -jar %JEDIT_HOME%\JEdit.jar -settings=%JEDIT_SETTINGS% -reuseview %*

Robert
 
Thanks Robert, this worked li
by sidewalking on Fri, 21/04/2006 - 13:06
Thanks Robert, this worked like a charm.

I am still getting weird compile errors when using the JCompile plugin or when it does work I cannot run the compiled code in the CLI. Maybe the path settings are just weird because this wasn't make to be portable (in terms of removable drive only).

At least I can run Java programs just fine in it, so that is a plus.

Scott
 
Options?
by Robert Schwenn on Fri, 21/04/2006 - 18:02
I didn't use JCompiler yet. May be You have to set some options of JCompiler or JavaCore plugin? Take a look at the help and in this forum topic

Robert

User login
Browse archives
« November 2024  
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
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300