harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Liang <richard.lian...@gmail.com>
Subject Re: [app] ant with ecj
Date Mon, 28 Aug 2006 03:55:34 GMT
Hello Jordan,

All the boot jars have been add in the javac tasks. Could you please 
paste the stack trace? Thanks a lot.

Please refer to modules/luni/build.xml
<javac>
....
            <bootclasspath>
                <fileset dir="${hy.jdk}/jre/lib/boot">
                    <include name="**/*.jar" />
                </fileset>
            </bootclasspath>

Best regards,
Richard

Jordan Justen wrote:
> Nathan,
>
> Is there a way to have the javac/ecj task include all of standard harmony
> jars without including them in the CLASSPATH environment variable?
>
> Thanks,
>
> -Jordan
>
> On 8/27/06, Nathan Beyer <nbeyer@kc.rr.com> wrote:
>>
>> Keep in mind that the execution of the Ant scripts and the 
>> compilation are
>> two separate things, which means they are using two different 
>> classpaths.
>> If
>> the compilation task is complaining about a missing class, then this 
>> means
>> the class is missing from the classpath of the compiler, not the 
>> classpath
>> of the executing Ant. You'll need the Eclipse compiler JAR on Ant's
>> execution classpath to execute the javac task.
>>
>> This can be confusing when using the Eclipse compiler, since it doesn't
>> have
>> any "default" classpath. Normally when you're using 'javac' from a JDK,
>> the
>> classpath of the underlying JRE (all of the java.*, etc classes) is
>> automatically on the classpath. The Eclipse compiler is not part of a 
>> JDK,
>> so there is nothing on the classpath by default.
>>
>> -Nathan
>>
>> > -----Original Message-----
>> > From: Jordan Justen [mailto:jljusten@gmail.com]
>> > Sent: Sunday, August 27, 2006 8:49 PM
>> > To: harmony-dev@incubator.apache.org
>> > Subject: Re: [app] ant with ecj
>> >
>> > Richard,
>> >
>> > Yes, I also added ecj_3.2.jar to the CLASSPATH.
>> >
>> > Ant works fine, but the first time a javac task is encountered, the
>> > compiler
>> > complained that java.lang.Object was not found.  I then added
>> > jdk/jre/lib/boot/kernel.jar to CLASSPATH.  Now, I see an error that
>> > java.lang.String is not found, so I added luni.jar to CLASSPATH.  
>> etc...
>> >
>> > Since ant is basically working (mkdir tasks, delete tasks, java tasks
>> all
>> > seem to work), I think the harmony jvm is loading these "boot" 
>> jars, but
>> > it
>> > seems like when the javac task uses ecj, those jars are not visible.
>> >
>> > I'm using windows xp, ant 1.6.5, and the latest harmony jdk snapshot.
>> >
>> > Thanks again,
>> >
>> > -Jordan
>> >
>> > On 8/27/06, Richard Liang <richard.liangyx@gmail.com> wrote:
>> > >
>> > >
>> > >
>> > > Jordan Justen wrote:
>> > > > Hi all.
>> > > >
>> > > > I'm trying to use ant with the ecj compiler.  I override the
>> compiler
>> > in
>> > > > build.xml like this:
>> > > >  <property name="build.compiler" value="
>> > > > org.eclipse.jdt.core.JDTCompilerAdapter" />
>> > > >
>> > > > This will execute the compiler, but I find I have to add each jar
>> from
>> > > > jdk/jre/lib/boot to CLASSPATH or else ecj won't find the standard
>> > > classes
>> > > > during compilation.
>> > > >
>> > > > This is probably user error, and not related to harmony. :)  Does
>> > anyone
>> > > > know what I might be improperly configuring?
>> > > Hello Jordan,
>> > >
>> > > Do you mean the "build.compiler" property in make/build_java.xml? I
>> just
>> > > give it a try by 1) overriding the compiler as what you have done 2)
>> > > adding C:\harmony\workspace\trunk\depends\jars\ecj_3.2\ecj_3.2.jar
>> into
>> > > classpath.
>> > >
>> > > Everything works OK. :-) Could you give more detailed information
>> about
>> > > this issue? Thanks a lot.
>> > >
>> > > Best regards,
>> > > Richard
>> > > >
>> > > > Thanks,
>> > > >
>> > > > -Jordan
>> > > >
>> > >
>> > > --
>> > > Richard Liang
>> > > China Software Development Lab, IBM
>> > >
>> > >
>> > >
>> > > 
>> ---------------------------------------------------------------------
>> > > Terms of use : http://incubator.apache.org/harmony/mailing.html
>> > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> > > For additional commands, e-mail: 
>> harmony-dev-help@incubator.apache.org
>> > >
>> > >
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>

-- 
Richard Liang
China Software Development Lab, IBM 



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message