Date: Fri, 13 Feb 2004 20:24:54 +0100 From: Marc van Kempen <marc@bowtie.nl> To: freebsd-java@freebsd.org Subject: Re: Netbeans 3.6Beta runide.sh fails on FreeBSD 5.2R Message-ID: <200402132024.54674.marc@bowtie.nl> In-Reply-To: <20040213184819.GA438@misty.eyesbeyond.com> References: <200402131836.17766.markus.svensson2@spray.se> <20040213184819.GA438@misty.eyesbeyond.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 13 February 2004 19:48, Greg Lewis wrote: > On Fri, Feb 13, 2004 at 06:36:17PM +0100, Markus Svensson wrote: > > I'm a member of the Netbeans 3.6 Community Acceptance Program (fancy word > > for bug hunter, I guess). I'm experiencing some issues with the runide.sh > > launcher script, which I hoped would be resolved by the Netbeans > > developers. But it appears that it won't be fixed, since fixing the > > script breaks it from MacOS X and Linux users. Anyone interested, please > > check out the discussion at > > http://www.netbeans.org/issues/show_bug.cgi?id=39830 and perhaps somebody > > can explain to me what why the JDK's on different platforms don't support > > the same parameters? > > I read the bug, and it doesn't look like it has anything to do with the > JDKs using different parameters. It looks like it has everything to do > with different syntaxes for the expr utility. > > Here is the issue (from expr(1)): > > Unless FreeBSD 4.x compatibility is enabled, this version of expr adheres > to the POSIX Utility Syntax Guidelines, which require that a leading > argument beginning with a minus sign be considered an option to the > program. The standard -- syntax may be used to prevent this > interpretation. > > e.g. > > > expr -J-Xms24m : '-J\(.*\)' > > expr: illegal option -- J > usage: expr [-e] expression > > However, note the first part of the quote from the man page! So, a > possibly solution is for runide.sh to set the EXPR_COMPAT environment > > variable. Then things will work, e.g.: > > env EXPR_COMPAT=1 expr -J-Xms24m : '-J\(.*\)' > > -Xms24m > > So, I would suggest adding these two lines to the script: > > EXPR_COMPAT=1 > export EXPR_COMPAT > > Then it will (hopefully) work on FreeBSD. > > I will note strongly that its Linux and OSX which are broken in this > respect though. FreeBSD is POSIX compliant, they are not. Another possible solution, that also works on Mac OSX and Linux is: expr X-J-Xms24m : 'X-J\(.*\)' Regards, Marc.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402132024.54674.marc>