[RFC] New Port: Eclipse Java Compiler, java/eclipse-ecj

Greg Lewis glewis at eyesbeyond.com
Tue Mar 20 01:58:38 UTC 2012


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.

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.

Note that I haven't tested the port though, so YMMV.

> I can change this.
> >
> >Thanks for working on this, BTW.
> 
> Your very welcome :)
> >
> >Jung-uk Kim
> >
> 
> -- 
> Jason Helfman         | FreeBSD Committer
> jgh at FreeBSD.org       | http://people.freebsd.org/~jgh

-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org


More information about the freebsd-java mailing list