harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: harmony ant help please...
Date Mon, 27 Nov 2006 18:19:15 GMT
Tim:  I've been out of contact over the (US) holiday.  I'm not having any luck with svn switch
(I haven't svn updated my copy of the classlib in a LONG time), but off the top of my head,
here's what I have to offer:

Ant provides includeantruntime and includejavaruntime attributes to the <javac> task.
 "includeantruntime" is true by default, so you should set it to false.  "includejavaruntime"
is ordinarily false by default, but a look into the JDTCompilerAdapter shows:

        if (this.bootclasspath != null && this.bootclasspath.size() != 0) {
                        /*
                         * Set the bootclasspath for the Eclipse compiler.
                         */
                        cmd.createArgument().setValue("-bootclasspath"); //$NON-NLS-1$
                        cmd.createArgument().setPath(this.bootclasspath);
        } else {
            this.includeJavaRuntime = true;
        }

Which should translate, roughly, to: specify the bootclasspath or ECJ will set includejavaruntime
to true, which is most likely where the JRE stuff is coming from.  Just what you should set
bootclasspath to is beyond my knowledge at this moment, but maybe you or somebody else from
H. knows.  ;)

HTH/BR,
Matt

----- Original Message ----
From: Tim Ellison <t.p.ellison@gmail.com>
To: gudnabrsam@yahoo.com
Sent: Friday, November 24, 2006 8:53:37 AM
Subject: harmony ant help please...


There is a thread on the harmony dev list about this, but the summary is
we have in our build script:

        <javac fork="yes"
               compiler="${hy.javac.compiler}"
               memoryMaximumSize="${hy.javac.maxmem}"
               destdir="${build.output}"
               source="${hy.javac.source}"
               target="${hy.javac.target}"
               debug="${hy.javac.debug}">

            <compilerarg value="-warn:none" />

            <src path="modules/accessibility/src/main/java/" />
            <src path="modules/annotation/src/main/java/" />
            <src path="modules/applet/src/main/java" />
            <src path="modules/archive/src/main/java" />
            <src path="modules/auth/src/main/java/${hy.os}" />
            ...more src folders...

            <classpath>
                <fileset dir="${depends.jars}">
                    <include name="**/*.jar" />
                </fileset>
            </classpath>
        </javac>



but ant -v shows that javac is passed a -cp argument with the base JRE
JAR files too!  If we specify a classpath why do we get more than we
want?  This means we are compiling Harmony code against Sun's impl!

e.g.

>     [javac] Since compiler setting isn't classic or modern,ignoring fork setting.
>     [javac] Compiling 1 source file to /home/tellison/Harmony/build/classes
>     [javac] Using JDT compiler
>     [javac] Since compiler setting isn't classic or modern,ignoring fork setting.
> dropping /opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/rt.jar from path as it doesn't
exist
> dropping /opt/j9vmxi3223-20060222a-sdk-cleaned/jre/jre/lib/rt.jar from path as it doesn't
exist
> dropping /opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/jce.jar from path as it doesn't
exist
> dropping /opt/j9vmxi3223-20060222a-sdk-cleaned/Classes/jce.jar from path as it doesn't
exist
> dropping /opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/jsse.jar from path as it doesn't
exist
> dropping /opt/j9vmxi3223-20060222a-sdk-cleaned/Classes/jsse.jar from path as it doesn't
exist
> dropping /opt/j9vmxi3223-20060222a-sdk-cleaned/Classes/classes.jar from path as it doesn't
exist
> dropping /opt/j9vmxi3223-20060222a-sdk-cleaned/Classes/ui.jar from path as it doesn't
exist
>     [javac] Compilation arguments:
>     [javac] '-noExit'
>     [javac] '-classpath'
>     [javac] '/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/ext/CmpCrmf.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/ext/dtfj-interfac
> e.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/ext/dtfj.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/ext/gskikm.jar:/opt/j9vmxi3
> 223-20060222a-sdk-cleaned/jre/lib/ext/ibmcmsprovider.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/ext/ibmjcefips.jar:/opt/j9vmxi3223-
> 20060222a-sdk-cleaned/jre/lib/ext/ibmjceprovider.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/ext/ibmkeycert.jar:/opt/j9vmxi3223-2006
> 0222a-sdk-cleaned/jre/lib/ext/ibmpkcs11.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/ext/ibmpkcs11impl.jar:/opt/j9vmxi3223-20060222a-
> sdk-cleaned/jre/lib/ext/ibmsaslprovider.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/ext/indicim.jar:/opt/j9vmxi3223-20060222a-sdk-cl
> eaned/jre/lib/ext/jaccess.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/ext/jdmpview.jar:/home/tellison/Harmony/build/classes:/home/te
> llison/Harmony/depends/jars/bcel-5.2/bcel-5.2.jar:/home/tellison/Harmony/depends/jars/bcprov-jdk14-133/bcprov.jar:/home/tellison/Harmony/d
> epends/jars/bcprov-jdk14-133/signed.bcprov.jar:/home/tellison/Harmony/depends/jars/bcprov-jdk14-134/signed.bcprov.jar:/home/tellison/Harmo
> ny/depends/jars/cpptasks-1.0b3/cpptasks.jar:/home/tellison/Harmony/depends/jars/ecj_3.2/ecj_3.2.jar:/home/tellison/Harmony/depends/jars/ic
> u4j_3.4.4/icu4j_3_4_4.jar:/home/tellison/Harmony/depends/jars/icu4jni-3.4.jar:/home/tellison/Harmony/depends/jars/jetty/jetty-6.0.0.jar:/h
> ome/tellison/Harmony/depends/jars/jetty/jetty-util-6.0.0.jar:/home/tellison/Harmony/depends/jars/jetty/servlet-api-2.5-6.0.0.jar:/home/tel
> lison/Harmony/depends/jars/junit_3.8.2/junit.jar:/home/tellison/Harmony/depends/jars/mx4j_3.0.1/mx4j-remote.jar:/home/tellison/Harmony/dep
> ends/jars/mx4j_3.0.1/mx4j.jar:/home/tellison/Harmony/depends/jars/xalan-j_2.7.0/xalan.jar:/home/tellison/Harmony/depends/jars/xerces_2.8.0
> /resolver.jar:/home/tellison/Harmony/depends/jars/xerces_2.8.0/xercesImpl.jar:/home/tellison/Harmony/depends/jars/xerces_2.8.0/xml-apis.ja
> r:/home/tellison/Harmony/depends/jars/yoko-m1/yoko-rmi.jar:/home/tellison/Harmony/depends/jars/yoko-m1/yoko.jar:/home/tellison/Harmony/dep
> ends/jars/yoko/yoko.jar:/home/tellison/Harmony/depends/jars/yoko_M1-20061027/yoko-rmi.jar:/home/tellison/Harmony/depends/jars/yoko_M1-2006
> 1027/yoko.jar:/usr/share/ant/lib/ant-launcher.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/xercesImpl.jar:/usr/share/ant/lib/ant-
> apache-bcel.jar:/usr/share/ant/lib/ant-antlr.jar:/usr/share/ant/lib/ant-apache-log4j.jar:/usr/share/ant/lib/ant-apache-bsf.jar:/usr/share/
> ant/lib/ant-apache-regexp.jar:/usr/share/ant/lib/ant-apache-oro.jar:/usr/share/ant/lib/ant-javamail.jar:/usr/share/ant/lib/ant.jar:/usr/sh
> are/ant/lib/cpptasks.jar:/usr/share/ant/lib/ant-commons-logging.jar:/usr/share/ant/lib/ant-jdepend.jar:/usr/share/ant/lib/ant-nodeps.jar:/
> usr/share/ant/lib/jdtCompilerAdapter.jar:/usr/share/ant/lib/ant-swing.jar:/usr/share/ant/lib/ant-bootstrap.jar:/usr/share/ant/lib/ant-jmf.
> jar:/usr/share/ant/lib/ant-apache-resolver.jar:/usr/share/ant/lib/catalina-ant.jar:/usr/share/ant/lib/junit.jar:/usr/share/ant/lib/org.ecl
> ipse.jdt.core_3.1.2.jar:/usr/share/ant/lib/ant-commons-net.jar:/usr/share/ant/lib/ant-jsch.jar:/usr/share/ant/lib/ant-junit.jar:/usr/share
> /ant/lib/ant-trax.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/lib/tools.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/core.jar:/opt/j9vm
> xi3223-20060222a-sdk-cleaned/jre/lib/graphics.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/security.jar:/opt/j9vmxi3223-20060222a-sdk
> -cleaned/jre/lib/server.jar:/opt/j9vmxi3223-20060222a-sdk-cleaned/jre/lib/xml.jar:/home/tellison/Harmony/modules/accessibility/src/main/ja
> va:/home/tellison/Harmony/modules/annotation/src/main/java:/home/tellison/Harmony/modules/applet/src/main/java:/home/tellison/Harmony/modu
> les/archive/src/main/java:/home/tellison/Harmony/modules/auth/src/main/java/linux:/home/tellison/Harmony/modules/auth/src/main/java/common
> :/home/tellison/Harmony/modules/awt/src/main/java/linux:/home/tellison/Harmony/modules/awt/src/main/java/common:/home/tellison/Harmony/mod
> ules/beans/src/main/java:/home/tellison/Harmony/modules/concurrent/src/main/java:/home/tellison/Harmony/modules/concurrent/standard/src/ma
> in/java:/home/tellison/Harmony/modules/crypto/src/main/java:/home/tellison/Harmony/modules/instrument/src/main/java:/home/tellison/Harmony
> /modules/imageio/src/main/java:/home/tellison/Harmony/modules/jndi/src/main/java:/home/tellison/Harmony/modules/logging/src/main/java:/hom
> e/tellison/Harmony/modules/lang-management/src/main/java:/home/tellison/Harmony/modules/luni-kernel/src/main/java:/home/tellison/Harmony/m
> odules/luni/src/main/java:/home/tellison/Harmony/modules/math/src/main/java:/home/tellison/Harmony/modules/misc/src/main/java:/home/tellis
> on/Harmony/modules/nio/src/main/java:/home/tellison/Harmony/modules/nio_char/src/main/java:/home/tellison/Harmony/modules/prefs/src/main/j
> ava:/home/tellison/Harmony/modules/print/src/main/java/linux:/home/tellison/Harmony/modules/print/src/main/java/common:/home/tellison/Harm
> ony/modules/regex/src/main/java:/home/tellison/Harmony/modules/rmi/src/main/java:/home/tellison/Harmony/modules/security-kernel/src/main/j
> ava:/home/tellison/Harmony/modules/security/src/main/java/linux:/home/tellison/Harmony/modules/security/src/main/java/common:/home/telliso
> n/Harmony/modules/sql/src/main/java:/home/tellison/Harmony/modules/suncompat/src/main/java:/home/tellison/Harmony/modules/swing/src/main/j
> ava/linux:/home/tellison/Harmony/modules/swing/src/main/java/common:/home/tellison/Harmony/modules/text/src/main/java:/home/tellison/Harmo
> ny/modules/x-net/src/main/java'
>     [javac] '-J-Xmx384M'
>     [javac] '-d'
>     [javac] '/home/tellison/Harmony/build/classes'
>     [javac] '-warn:none'
>     [javac]
>     [javac] The ' characters around the executable and arguments are
>     [javac] not part of the command.
>     [javac] File to be compiled:
>     [javac]     /home/tellison/Harmony/modules/security/src/main/java/common/java/security/Security.java
>     [javac] ----------
>     [javac] 1. ERROR in /home/tellison/Harmony/modules/security/src/main/java/common/java/security/Security.java
>     [javac]  (at line 217)
>     [javac]     Services.removeProvider(p.getProviderNumber());
>     [javac]                               ^^^^^^^^^^^^^^^^^
>     [javac] The method getProviderNumber() is undefined for the type Provider
> 
> 




-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.


 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited

Mime
View raw message