|
From: Randall R S. <rs...@so...> - 2007-05-04 19:24:36
|
On Friday 04 May 2007 12:11, Robert Schwenn wrote:
> ...
>> Does this happen when opening a file from within jEdit with File
>> System Browser?
>
> Does not happen if file is opened with jEdit File System browser.
> It does happen in KDE when I open the file with right-click > jEdit.
> In that case 2 buffers are opened.
> Example :
> space folder/test.txt
> This will open buffers :
> - space
> -=C2=A0 test.txt : which is opened as a new file
The problem is the naive shell script that is used to launch jEdit. It=20
does not quote the $@ at the end of the exec line that launches the JVM=20
to run jEdit.
I replace that script with this one, which while not generic enough to=20
be included in the distribution, illustrates the proper quoting of the=20
arguments passed to it (the last line):
=2D=3D=3D--=3D=3D--=3D=3D--=3D=3D--=3D=3D-/usr/local/bin/jedit-=3D=3D--=3D=
=3D--=3D=3D--=3D=3D--=3D=3D-
#!/bin/bash --norc
DEFAULT_JAVA_HOME=3D"$JAVA5_HOME"
# Which jEdit version
JEDIT_JAR=3D"/usr/local/share/jedit/4.3pre8/jedit.jar"
# Java heap size, in megabytes
JAVA_HEAP_SIZE=3D64
JAVA5_HOME=3D"/usr/lib/jvm/java-1.5.0-sun"
if [ "$JAVA_HOME" =3D "" ]; then
JAVA_HOME=3D"$DEFAULT_JAVA_HOME"
fi
exec \
"$JAVA_HOME/bin/java" \
-mx${JAVA_HEAP_SIZE}m \
${JEDIT} \
-jar "$JEDIT_JAR" \
"$@"
=2D=3D=3D--=3D=3D--=3D=3D--=3D=3D--=3D=3D-/usr/local/bin/jedit-=3D=3D--=3D=
=3D--=3D=3D--=3D=3D--=3D=3D-
> --
> John Zoetebier
Randall Schulz
|