zoukankan      html  css  js  c++  java
  • Caused by: java.lang.IllegalArgumentException

    Caused by: java.lang.IllegalArgumentException 是因为jdk较高而项目需要的是低版本的问题

    1.将idea或idea里的语言级别调到适合自己项目的版本比如安装的是1.8 项目需要1.6的环境 这样之后本地运行应该就没问题了(只用过idea eclipse还没试) 在没加下面这步之前 不要用maven打包 这样idea会用你打好的包 这样也会报错。 

    2.如果要解决服务器上报这样错 在pom文件里加以下: 这样过后即便是打了包也没问题

    pom文件里加

    <build>
    <finalName>xxxxxx</finalName>
    <plugins>
    <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.5.1</version>

    <configuration>
    <!-- 以下是修改我们编译时的jdk版本 即使是高版本jdk 设置之后打包编译会根据你的设置的版本去执行 -->
    <!-- use the Java 6 language features -->
    <source>1.6</source>
    <!-- want the compiled classes to be compatible with JVM 1.6 -->
    <target>1.6</target>
    <!-- The -encoding argument for the Java compiler. -->
    <encoding>UTF8</encoding>
    </configuration>

       </plugin>

    </plugins>
    </build>
  • 相关阅读:
    pyinstaller
    screen
    docker
    rsync
    shutil模块
    mysql innodb 理解
    B 树和B+树存储的区别
    B-树原理分析
    mysql 通过mycat 读写分离
    mysql 主从复制
  • 原文地址:https://www.cnblogs.com/AmbitiousMice/p/9288190.html
Copyright © 2011-2022 走看看