不能运行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>

最新文章

  1. 使用JPype实现Python调用JAVA程序
  2. MS sql server 基础知识回顾(二)-表连接和子查询
  3. Cwinux简介及用法简述
  4. Hadoop集群(第10期副刊)_常用MySQL数据库命令
  5. Makefile与shell脚本的区别
  6. python对拍程序
  7. storm高级原语-Transactional topology
  8. PHP面向对象基础实例
  9. Android开发技术周报
  10. Activity与Activity之间的传值
  11. HTTP 405 错误 – 方法不被允许 (Method not allowed)【转载】
  12. ASP.NET网站不能在VS中调试
  13. C# Common Code
  14. 03 使用Tensorflow做计算题
  15. 数据同步到redis中时候需要 需要给关联的表增加id 如果是一对多 则增加list存储id 如果是一个 则增加一个字段 ;目的是便于取值
  16. 加密解密DES之Android、IOS、C#实现
  17. springboot13 发布和监听事件
  18. 用python写一个定时提醒程序
  19. MySql使用笔记
  20. jenkins + gerrit 自动code review

热门文章

  1. Linux命令学习-01——find -type
  2. sizeof和strlen在string类中的使用
  3. C++ part4
  4. chrome禁用缓存:调试javascript注意事项
  5. hdu5693D++游戏 区间DP-暴力递归
  6. Pycharm无法import caffe
  7. 如何禁用 Chrome Taps Group feature &amp;#128169;
  8. js double 精度损失 bugs
  9. Teadocs &amp; markdown website
  10. ip &amp; 0.0.0.0 &amp; 127.0.0.1 &amp; localhost