不能运行java程序

可能是没有选择运行环境
点击 edit Configurations
在Use classpath of module 中选择本项目的运行环境

Run报错:

Error:java: Compilation failed: internal java compiler error

a.进入Feil--->Settings...--->Build Tools--->Java Compiler
b.Per-module bytecode version:中
Module 选择对应的项目
Target bytecode version 选择对应当前设置的java版本

@Override报错:

设置

Feil->Project Structure...->Modules->
Sources->Language level->6-@Override in interfaces

在Maven项目中每次修改了pom.xml文件后Language level可能会重置

所以使用maven插件方便

<build>
<plugins>
<!-- 使用maven-compiler-plugin 同时配置Java compiler和Language level -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

IntelliJ IDEA报错总结的更多相关文章

  1. git拉代码,IntelliJ idea报错,cannot load module xxxxx

    1 从git上下工程的时候,IntelliJ idea报错,cannot load module xxxx VCS-git-clone-ssh:xxxx ,报错cannot load module x ...

  2. Intellij IDEA 报错java.lang.NoClassDefFoundError

    Intellij IDEA 报错java.lang.NoClassDefFoundError 11-Aug-2018 23:48:24.686 严重 [http-nio-8080-exec-5] or ...

  3. Intellij +Maven 报错: Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.

    在intellij使用 Maven Project 测试时,运行test时看到log里的报错信息: -Dmaven.multiModuleProjectDirectory system propert ...

  4. [Intellij] 编译报错 javacTask

    报错信息: Idea 编译报错 javacTask: 源发行版 1.6 需要目标发行版 1.6 解决方案:

  5. IntelliJ IDEA 报错:Error:java: 未结束的字符串文字

    构建javaweb项目时,控制台报错: 这个问题是由于编码冲突导致的,在设置中找到File Encodings可以看到 ide采用utf-8编码格式,而项目则是GBK编码方式,由此产生冲突. 解决办法 ...

  6. 分享知识-快乐自己:intellij Idea报错Could not autowire. No beans of...

    intellig idea 使用@Resource或者@Autowire报错,出现红色波浪线: 虽然不影响使用,但是看着很不爽,所以还是解决了下: 报错提示: Could not autowire. ...

  7. IntelliJ IDEA 报错:找不到包或者找不到符号

    原因 在网上各种找 https://blog.csdn.net/qq_17213067/article/details/78895302 https://blog.csdn.net/u01398566 ...

  8. Intellij IDEA报错:Could not save application settings: java.io.IOException: java.lang.AssertionError: Unexpected content storage modificat

    Question: i have a message saying "Could not save application settings: java.io.IOException: ja ...

  9. Mac上 intellij IDEA报错:Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk .jdk/Contents/Home/bin/java ( ) and /Library/Java/JavaVirtualMachines/jdk

    解决方案: 点击IDEA菜单里的Help-Edit Custom Properties,没有这个properties文件的话,会提示创建,在里面加上 idea.no.launcher=true 说明: ...

随机推荐

  1. 1077E Thematic Contests 【二分答案】

    题目:戳这里 题意:n个数代表n个problem,每个数的值代表这个问题的topic,让我们挑出一些problems,满足挑出problems的topic是首项为a1公比为2的等比数列(每种topic ...

  2. sdutoj2887

    #include <stdio.h> #include <math.h> int main(){ int px,tx;double alpha; int T;scanf(&qu ...

  3. 如何在 VSCODE 中高效使用 R 语言

    VSCODE 配置 R 一.功能特性展示 之前一直在用 Rstudio 来编写 R,也尝试用过 Pycharm 配置 R 环境. 但是由于现在需求要同时满足 Python,R 和网站要同时开发,为了避 ...

  4. full page screen capture in js

    full page screen capture in js html2canvas https://html2canvas.hertzen.com/ https://github.com/nikla ...

  5. website 性能检测 & 前端性能优化

    website 性能检测 & 前端性能优化 https://cdn.xgqfrms.xyz/ https://mobile.xgqfrms.xyz/ PageSpeed Insights ht ...

  6. taro 进阶指南

    taro 进阶指南 配置 https://nervjs.github.io/taro/docs/config.html https://nervjs.github.io/taro/docs/confi ...

  7. npm init & npx create & yarn create

    npm init & npx create & yarn create https://create-react-app.dev/docs/getting-started/#creat ...

  8. flutter 使用vs编辑windows插件

    创建插件 mkdir win_test && cd win_test flutter create -t plugin --platforms windows ./ 找到win_tes ...

  9. 微信小程序:app.json中通过使用扩展库userExtendedLib的方式,引入并使用weui

    微信小程序  PK  APP: 1.微信有海量⽤⼾,⽽且粘性很⾼,在微信⾥开发产品更容易触达⽤⼾:而推⼴app的成本太⾼. 2.微信小程序也可以跨平台(Android和IOS). 一.project. ...

  10. WPF权限控制框架——【4】抛砖引玉

    写第一篇"权限控制框架"系列博客是在2021-01-29,在这不到一个月的时间里,收集自己零碎的时间,竟然写出了一个"麻雀虽小,五脏俱全"的权限控制框架:对于一 ...