From owner-freebsd-java@FreeBSD.ORG Fri Feb 13 11:25:14 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8CF916A4CE for ; Fri, 13 Feb 2004 11:25:14 -0800 (PST) Received: from d7058.upc-d.chello.nl (d7058.upc-d.chello.nl [213.46.7.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5F9643D31 for ; Fri, 13 Feb 2004 11:25:13 -0800 (PST) (envelope-from marc@bowtie.nl) Received: from host10.meck.bowtie.nl (host10.meck.bowtie.nl [192.168.5.10]) i1DJOt0E059246; Fri, 13 Feb 2004 20:24:57 +0100 (CET) (envelope-from marc@bowtie.nl) From: Marc van Kempen To: freebsd-java@freebsd.org Date: Fri, 13 Feb 2004 20:24:54 +0100 User-Agent: KMail/1.6 References: <200402131836.17766.markus.svensson2@spray.se> <20040213184819.GA438@misty.eyesbeyond.com> In-Reply-To: <20040213184819.GA438@misty.eyesbeyond.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200402132024.54674.marc@bowtie.nl> Subject: Re: Netbeans 3.6Beta runide.sh fails on FreeBSD 5.2R X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2004 19:25:15 -0000 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.