From owner-freebsd-java@FreeBSD.ORG Tue Mar 20 16:41:14 2012 Return-Path: Delivered-To: freebsd-java@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 78258106566B; Tue, 20 Mar 2012 16:41:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Greg Lewis Date: Tue, 20 Mar 2012 12:41:02 -0400 User-Agent: KMail/1.6.2 References: <20120318180225.GA51618@dormouse.experts-exchange.com> <20120319230818.GJ46825@dormouse.experts-exchange.com> <20120320015836.GA83617@misty.eyesbeyond.com> In-Reply-To: <20120320015836.GA83617@misty.eyesbeyond.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203201241.04720.jkim@FreeBSD.org> Cc: freebsd-eclipse@FreeBSD.org, Jason Helfman , freebsd-java@FreeBSD.org Subject: Re: [RFC] New Port: Eclipse Java Compiler, java/eclipse-ecj X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2012 16:41:14 -0000 On Monday 19 March 2012 09:58 pm, Greg Lewis wrote: > On Mon, Mar 19, 2012 at 04:08:18PM -0700, Jason Helfman wrote: > > On Mon, Mar 19, 2012 at 07:00:39PM -0400, Jung-uk Kim thus spake: > > >Hmm... It doesn't seem right. > > > > > >% cat /usr/local/bin/ecj.sh > > >#!/bin/sh > > > > > >/usr/local/openjdk6/bin/javac -classpath > > > /usr/local/share/java/classes/ecj.jar $1 % > > > /usr/local/bin/ecj.sh -version > > >javac 1.6.0_30 > > >% /usr/local/openjdk6/bin/javac -version > > >javac 1.6.0_30 > > > > > >Please note it isn't coming from ecj.jar. > > > > That is grabbing the version of javac based on the shell script. > > I'm not certain if you can get a vesion of the jar with an > > argument, or if that argument is even valid. > > > > >Also, `$1' should be `$*'. > > I could be wrong, but I thought the preferred version of this was > "$@" (as is, including the double quotes). IIRC using $* doesn't > quite work properly if some of your arguments have spaces in them. Ah, you're right, "$@" is better than $* in this case. > Instead of %%JAVAC%% I'd suggest %%LOCALBASE%%/bin/javac so that > the selection of which JDK to use can be done at run time rather > than port install time. I totally agree with you, too. However, it should be java. javac cannot "execute" ecj.jar. Thanks, Jung-uk Kim