• 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配置

  • 相关阅读:
    android自定义View之NotePad出鞘记
    一个电商项目的Web服务化改造
    一个电商项目的Web服务化改造
    POJ 2886 Who Gets the Most Candies?
    POJ 2392 Space Elevator
    POJ 1276 Cash Machine
    POJ 2063 Investment
    CodeForces 159c String Manipulation 1.0
    Gym
    FZU 1921 栀子花开
  • 原文地址:https://www.cnblogs.com/hi-gdl/p/13036401.html
Copyright © 2020-2023  润新知