jEdit Community - Resources for users of the jEdit Text Editor
JAVA_HOME PATH How do I set it?
Submitted by steve_o on Tuesday, 10 April, 2007 - 13:30
I have installed jEdit on my edgy Ubuntu box and unfortunately for me it does not work. On reading their documentation found at: http://www.jedit.org/index.php?page=compatibility#unix
It appears that I need to set my JAVA_HOME PATH. I am a Linux newbie and I have no idea how to do that. I have searched far and wide but cant find a definitive way to achieve this or much in the way of help.

All help will be welcomed

Cheers in advance

Steve
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
I have come up with a solutio
by steve_o on Thu, 12/04/2007 - 11:44
I have come up with a solution its not the tidiest of solutions but it does work. Create an executable text file with the following code:

export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.08
export PATH=$JAVA_HOME/bin:$PATH
jedit &

I know there must be a script which I could just edit to achieve the same result but i cant find it. I previously followed the solution outlined in your compatibility section but that only works just after you execute the code thus the need for a script file. The code i used was as follows:

which java
/usr/bin/java
java -version
java version "1.4.2-02"
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.08
export PATH=$JAVA_HOME/bin:$PATH
which java
/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/bin/java
java -version
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
jedit &

If any one wants to tell me which file to edit I would be most grateful

Cheers steve
 
If you used the jedit install
by cvicari on Thu, 12/04/2007 - 13:33
If you used the jedit installer to install it, it should have created a file in your home bin directory, that is, if your username is "user":
/home/user/bin/jedit
and so you can safely edit it and change all the variables you need
 
JAVA_HOME
by steve_o on Mon, 16/04/2007 - 10:30
i used ./configure make and make install commands to install the software. I dont have the following directory /home/user/bin/jedit but i do have /home/steve/.jedit there are files and subfolders in there but i cant find anything regarding JAVA_HOME. I have one other file jedit that is located in /usr/bin. This seems more promising but i get it to work with any modification. The file reads as follows:

#!/bin/sh
#
# Runs jEdit - Programmer's Text Editor.
#

# Set jvm heap initial and maximum sizes (in megabytes).
JAVA_HEAP_INIT_SIZE=64
JAVA_HEAP_MAX_SIZE=192

# Find a java installation.
if [ -z "$JAVA_HOME" ]; then
echo "Warning: \$JAVA_HOME environment variable not set! Consider setting it."
echo " Attempting to locate java..."
j=`which java 2>/dev/null`
if [ -z "$j" ]; then
echo "Failed to locate the java virtual machine! Bailing..."
exit 1
else
echo "Found a virtual machine at: $j..."
JAVA="$j"
fi
else
JAVA="$JAVA_HOME/bin/java"
# Various attempts at editing the file
# 1
# export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.08
# export PATH=$JAVA_HOME/bin:$PATH
# 2
# JAVA="$JAVA_HOME/usr/lib/jvm/java-1.5.0-sun-1.5.0.08"
# End editing attempts
fi

# Launch application.
exec $JAVA -Xms${JAVA_HEAP_INIT_SIZE}M -Xmx${JAVA_HEAP_MAX_SIZE}M -jar /usr/share/jEdit/jedit.jar -reuseview $@
User login
Browse archives
« April 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   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293