zoukankan      html  css  js  c++  java
  • ant打包报错 JRE version less than 1.8 is not suppored

    ant 打包错误如下 :

     解决方案 :

    使用 apache-ant-1.9.15 及之下版本的ant 

    编辑工作空间下文件    .metadata/.plugins/org.eclipse.debug.core/.launches/项目名 build.xml.launch , 添加红色部分代码

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
    <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
    <listEntry value="/项目名/build.xml"/>
    </listAttribute>
    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
    <listEntry value="1"/>
    </listAttribute>
    <listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
    <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_39&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
    <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.antHome&quot;&gt;&#13;&#10;&lt;memento antHome=&quot;D:/apache-ant-1.9.15&quot;/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
    <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.extraClasspathEntries&quot;&gt;&#13;&#10;&lt;memento/&gt;&#13;&#10;&lt;/runtimeClasspathEntry&gt;&#13;&#10;"/>
    </listAttribute>
    <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
    <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
    <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_39"/>
    <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
    <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="项目名"/>
    <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="init,clean,generwar,compile1,compile2,copy1,ok,"/>
    <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/项目名/build.xml}"/>
    <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
    </launchConfiguration>

    注意里面的ant和jdk配置

  • 相关阅读:
    BZOJ1001 狼抓兔子 终于过了!
    BZOJ 1901: Zju2112 Dynamic Rankings( 树状数组套主席树 )
    BZOJ 2302: [HAOI2011]Problem c( dp )
    BZOJ 1407: [Noi2002]Savage( 数论 )
    BZOJ 2661: [BeiJing wc2012]连连看( 费用流 )
    BZOJ 1021: [SHOI2008]Debt 循环的债务( dp )
    BZOJ 3170: [Tjoi 2013]松鼠聚会( sort )
    BZOJ 2301: [HAOI2011]Problem b( 数论 )
    BZOJ 2434: [Noi2011]阿狸的打字机( AC自动机 + DFS序 + 树状数组 )
    BZOJ 3231: [Sdoi2008]递归数列( 矩阵快速幂 )
  • 原文地址:https://www.cnblogs.com/hi-gdl/p/13036401.html
Copyright © 2011-2022 走看看