Posted by
Jonathan Jackson-2 on
Sep 16, 2008; 10:00am
URL: http://imagej.273.s1.nabble.com/Linux-download-tp3695105p3695106.html
>thanks for maintaining the ImageJ Debian package. The run script seems
>to be a modified version of the file script.txt distributed with ImageJ
>(or vice versa?), and suffers from the same error on 32 bit linux
>architectures: it does not allow to change the size of the JVM heap.
>Making use of the -x switch of the run script will trigger the following
>error:
>
>sheim@stardust:~$ imagej -x 1500
>/usr/bin/imagej: line 263: ((: 1500 < 16 || 1500 > : syntax error: operand
expected (error token is " ")
>
>This is due to the variable max_mem being left unassigned on 32 bit
>architectures. This patch:
>
>--- imagej.orig 2008-07-11 11:24:15.000000000 +0200
>+++ imagej 2008-07-11 11:24:17.000000000 +0200
>@@ -102,7 +102,7 @@
> else
> arch='-d32'
> java_path="${ij_path}/jre/bin/java"
>- free_mem=`free | awk 'NR == 2 {fmem=int($2 / 1024); if (fmem <
1800) {print fmem} else {print 1800}}'`
>+ max_mem=`free | awk 'NR == 2 {fmem=int($2 / 1024); if (fmem < 1800)
{print fmem} else {print 1800}}'`
> free_mem=`free | awk 'NR == 3 {fmem=int($4 / 1024); if
(fmem < 1800) {print fmem} else {print 1800}}'`
> mem=${free_mem}/3*2
> if (( $mem > $default_mem || $mem < $min_mem )) ; then
mem=$default_mem ; fi
>
>fixes that issue. I had already filed a bug report for the Debian
>package (
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=496798 ), but
>got no response so far, so I'm reposting this here, because I think this
>sould also be fixed in the script.txt distributed with ImageJ.
>
>Thanks for your work,
>-Stefan
>=========================================================================
Thanks Paulo for maintaining the debian package, and thanks Stefan for
pointing out the bug in script.txt.
I've sent an updated version of script.txt to Wayne which fixes this and
improves support for spaces in filenames. I'll also send it to Paulo off
list in case any of the changes are of value for the debian version. Later
I'll look into replacing my version with the debian version.
regards,
Jon