zoukankan      html  css  js  c++  java
  • How to send mail by java mail in Android uiautomator testing?

    1. Go to link

    http://www.cnblogs.com/rosepotato/admin/Files.aspx to download the libs_javamail_jars.7z which contains activation.jar,additionnal.jar and mail.jar and java file Mail.7z.

    2. put the activation.jar,additionnal.jar and mail.jar into libs directory.

    3. copy

        <property name="jar.libs.dir" value="libs" />
        <property name="jar.libs.absolute.dir" location="${jar.libs.dir}" />
        <path id="classpath">
            <fileset dir="${jar.libs.absolute.dir}">
                <include name="activation.jar"/>
                <include name="additionnal.jar"/>
                <include name="mail.jar"/>
            </fileset>
        </path>

    before the line

        <!-- version-tag: VERSION_TAG -->
        <import file="${sdk.dir}/tools/ant/uibuild.xml" />
    

     in build.xml.

    4. put

        <!-- overwrite the compile target in uibuild.xml to include to external jars -->
        <target name="compile" depends="-build-setup, -pre-compile">
            <javac encoding="${java.encoding}"
                    source="${java.source}" target="${java.target}"
                    debug="true" extdirs="" includeantruntime="false"
                    destdir="${out.classes.absolute.dir}"
                    bootclasspathref="project.target.class.path"
                    verbose="${verbose}"
                    fork="${need.javac.fork}">
                    <src path="${source.absolute.dir}" />
                    <classpath refid="classpath"/>
                    <compilerarg line="${java.compilerargs}" />
            </javac>
        </target>
    
        <!-- overwrite the -dex target in uibuild.xml to include external jar files into the target dex file. -->
        <target name="-dex" depends="compile, -post-compile">
            <dex executable="${dx}"
                    output="${intermediate.dex.file}"
                    nolocals="@{nolocals}"
                    verbose="${verbose}">
                <fileset dir="${jar.libs.absolute.dir}">
                     <include name="activation.jar"/>
                     <include name="additionnal.jar"/>
                     <include name="mail.jar"/>
                </fileset>
                <path path="${out.classes.absolute.dir}"/>
            </dex>
        </target>

    after the line

        <!-- version-tag: VERSION_TAG -->
        <import file="${sdk.dir}/tools/ant/uibuild.xml" />

    then, everything is ok.

  • 相关阅读:
    https原理以及golang基本实现
    关于Goroutine与Channel
    Golang中log与fmt区别
    liteide使用中的注意点
    Golang中的error类型
    关于linux中的目录配置标准以及文件基本信息
    Godep的基本使用
    Golang基本类型整理
    ssh使用技巧
    看完让你彻底搞懂Websocket原理
  • 原文地址:https://www.cnblogs.com/rosepotato/p/3123969.html
Copyright © 2011-2022 走看看