From owner-freebsd-java@FreeBSD.ORG Mon Mar 19 23:00:55 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 193FB1065670; Mon, 19 Mar 2012 23:00:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-java@freebsd.org Date: Mon, 19 Mar 2012 19:00:39 -0400 User-Agent: KMail/1.6.2 References: <20120318180225.GA51618@dormouse.experts-exchange.com> <20120319193152.GD46825@dormouse.experts-exchange.com> <20120319215933.GG46825@dormouse.experts-exchange.com> In-Reply-To: <20120319215933.GG46825@dormouse.experts-exchange.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203191900.42677.jkim@FreeBSD.org> Cc: Jason Helfman , freebsd-eclipse@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: Mon, 19 Mar 2012 23:00:55 -0000 On Monday 19 March 2012 05:59 pm, Jason Helfman wrote: > On Mon, Mar 19, 2012 at 12:31:52PM -0700, Jason Helfman thus spake: > >On Mon, Mar 19, 2012 at 08:57:52AM -0700, Greg Lewis thus spake: > >>G'day Jason, > >> > >>On Sun, Mar 18, 2012 at 11:02:25AM -0700, Jason Helfman wrote: > >>> Hello All, > >>> > >>> I was looking through this pr: > >>> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/151923 > >>> > >>> And saw the final idea was to just build icedtea. I found one > >>> of the build requirements to be the the Eclipse Java Compiler, > >>> but didn't find this in the tree. > >>> > >>> I've used the ecj.jar for sometime now compiling outside of the > >>> Eclipse environment, and thought it would be a good idea to get > >>> this into the tree, if it isn't already there. > >>> > >>> I didn't see the compiler in the tree, and thought it could > >>> help in getting a final solution together for not just this pr, > >>> but I believe it would move along some other efforts, as well. > >>> > >>> If this does nothing at all, I would hope it just provides the > >>> bare minimum compiler. > >>> > >>> Attached is the shell archive of Eclipse Java Compiler. If > >>> there are no objections I was going to put this into the tree > >>> this week. > >> > >>I'd like to see ECJ in the ports tree. > >> > >>One question on the port. It looks like it only installs > >> ecj.jar. Wouldn't it also be useful to install a script to run > >> it? I can certainly manually type 'java -jar > >> /usr/local/share/java/classes/ecj.jar -classpath rt.jar > >> Foo.java', but it would be simpler if there was an ecj script > >> that maybe just let me do 'ecj Foo.java'. Is there a good > >> reason not to write such a script? > > > >I can't see of a reason to have that, however I can see a reason > > to at least have a package message to that affect. I'm not sure > > how to account for an unknown amount of arguments in a shell > > script, unless there is only ever going to be one argument? If > > the latter is the case, then including a shell script would be > > nice. > > > >How does this work? > > > >#!/bin/sh > > > >%%JAVA%% -jar %%JAVAJARDIR%%/%%PORTNAME%%.jar -classpath $1 > > I was able to get this to work: > > #!/bin/sh > > %%JAVAC%% -classpath %%JAVAJARDIR%%/ecj.jar $1 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. Also, `$1' should be `$*'. Thanks for working on this, BTW. Jung-uk Kim