Dynamic Web Module 3.0 requires Java 1.6 or newer

百度说是因为JAVA编译器的版本太低,需要在preferences->java->compiler选择右边的Compiler compliance level:为1.6以上版本。但是我这已经是1.8了,不是这个问题。

接着又看到有说工程的.classpath文件里配置了J2SE-1.5,其实就是工程的buildpath-Libraries里的JRE System Library。我这也是1.8,还是没解决问题

    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">

继续找到第三种方案,打开项目的根目录找到.settings文件夹,修改里边的文件中设计版本号的地方,我这也都是1.8.。。。

eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8

继续找到第四种方案,说是Maven 3.0 source和target的默认设置都是1.5,与运行Maven时的JDK版本无关,除非在项目的POM文件中显示的指定一个版本,否则每次更新后都会使用编译器默认的source/target版本1.5。这个是正解,在pom.xml里加上这个终于好使了。

    <plugin>  
        <groupId>org.apache.maven.plugins</groupId>  
        <artifactId>maven-compiler-plugin</artifactId>  
        <version>2.3.2</version>  
        <configuration>  
            <source>1.8</source>  
            <target>1.8</target>  
        </configuration>  
    </plugin> 

但这只是针对单独的项目配置,最终的方法是修改maven的settings.xml配置,将maven的默认设置改为1.8:

<profiles>
    <profile>
      <id>jdk-1.8</id>

      <activation>
        <activeByDefault>true</activeByDefault>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
      </properties>
    </profile>
</profiles>



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CentOS 8 的 Python 要求安装 OpenSSL 1.1.1 版本或更高版本。OpenSSL 是一个开源的加密库,提供了一组加密算法和安全通信协议的实现,被广泛应用于网络和系统安全领域。 为了满足 CentOS 8 的 Python 对 OpenSSL 版本的要求,可以按照以下步骤进行操作: 1. 检查当前系统上已安装的 OpenSSL 版本。可以通过在终端中运行以下命令来查看: ``` openssl version ``` 如果显示的版本低于 1.1.1,需要更新 OpenSSL。 2. 更新 OpenSSL。CentOS 8 的软件包管理器是 DNF (Dandified Yum),可以使用以下命令执行更新操作: ``` sudo dnf update openssl ``` 执行此操作后,系统会检查 OpenSSL 软件包的可用更新,并提示是否执行更新。按照提示操作即可完成更新。 3. 验证更新结果。在更新完成后,再次运行以下命令来查看已安装的 OpenSSL 版本: ``` openssl version ``` 如果显示的版本为 1.1.1 或更高版本,则证明更新成功。 4. 现在,您的 CentOS 8 系统已具备 Python 所需的 OpenSSL 版本要求。可以安装或运行需要较新 OpenSSL 版本的 Python 应用程序了。 Python 与 OpenSSL 的版本兼容性是重要的,因为 OpenSSL 提供了许多加密和网络安全相关的功能,而 Python 在处理加密和网络通信时需要依赖 OpenSSL。确保安装了正确版本的 OpenSSL 能够提高系统的安全性,并使 Python 在使用加密和网络功能时能够充分发挥作用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值