Intellij编译时报“java: System Java Compiler was not found in classpath”

问题如下:

http://stackoverflow.com/questions/19889145/setting-up-intellij-12-idea-with-java-1-7-and-resolve-java-system-java-compile

  1. IntelliJ 12 CE downloaded and installed
  2. Latest Java 1.7 downloaded and installed
  3. JDK was setup to make and run the project

I faced the following strange error

Error: java: System Java Compiler was not found in classpath


The solution that fixed my problem was as follows:

In:

Project Settings > Compiler > Java Compiler

I changed the drop down Use compiler from Javac to Eclipse!

Non of the other solutions I found on the web was helpful. Hope this helps you my unknown fellow reader.

IMPORTANT: THIS HAD NOTHING TO DO WITH MY JAVA_HOME AS IT WAS SET CORRECTLY.

时间: 2024-10-27 11:06:08

Intellij编译时报“java: System Java Compiler was not found in classpath”的相关文章

Intellij编译时报“java: System Java Compiler was not found in classpath” 解决办法

Intellij编译时报“java: System Java Compiler was not found in classpath” 解决方法: Project Settings > Compiler > Java Compiler changed the drop down Use compiler from Javac to Eclipse!

Intellij 编译时报 未结束的字符串字面值

问题 Intellij 编译时报 未结束的字符串字面值等错误,如下图: 解决方案 首先,配置项目编码 file-encoding 中设置中均为UTF-8. 其次,重点 打开.idea文件下的encodings.xml,可以看到,其中有非UTF-8的编码,将其改统一即可.其他类型的编码同样的处理方法.如下图: 版权声明:本文为博主原创文章,未经博主允许不得转载.

hive启动时报错${system:java.io.tmpdir

Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D这是因为在hive-site.xml配置文件中需要配置system:java.io.tmpdir属性. 在配置文件中加入: <proper

Cannot find the system java compiler. Check that your class path includes tools.jar报错处理

今天启动项目的时候中遇到 java.lang.illegalstateexception:Cannot find the system java compiler. Check that your class path includes tools.jar 主要原因是因为编译器在编译时找不到 tools.jar 解决方案一:将%JAVA_HOME%\lib\tools.jar文件复制到%JAVA_HOME%\jre\lib\目录下 解决方案二: 右击所有project下的JRE System L

Java编译时报错“错误: 找不到或无法加载主类”的解决方法

一.问题描述 java在执行的时候,会遇到这样的报错,编译可以正常通过,只是执行java命令时会报错,例如: G:\1\JavaPrac\tankproject\src\tank1>javac TankGame1.java G:\1\JavaPrac\tankproject\src\tank1>java TankGame1错误: 找不到或无法加载主类 TankGame1 二.解决方法 主要是配置环境变量可能有问题,着重检查环境变量. 环境变量配置: 第一步: "变量名":J

hive启动时报错: Relative path in absolute URI: ${system:java.io.t

Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D这是因为在hive-site.xml配置文件中需要配置system:java.io.tmpdir属性. 在配置文件中加入: <proper

Java System Properties

未命名 java.runtime.name=Java(TM) SE Runtime Environmentsun.boot.library.path=D:\Program Files\Java\jdk1.6.0_31\jre\binjava.vm.version=0.2-b02-internal, 19.0-b04-internaljava.vm.vendor=Sun Microsystems Inc.java.vendor.url=http://java.sun.com/path.separa

java System 常用方法

一.System.currentTimeMillis() 获取系统当前时间,毫秒 二.System.getProperty Java.version Java 运行时环境版本 java.vendor Java 运行时环境供应商 java.vendor.url Java 供应商的 URL java.home Java 安装目录 java.vm.specification.version Java 虚拟机规范版本 java.vm.specification.vendor Java 虚拟机规范供应商

java System属性

java.version Java 运行时环境版本 java.vendor Java 运行时环境供应商 java.vendor.url Java 供应商的 URL java.home Java 安装目录 java.vm.specification.version Java 虚拟机规范版本 java.vm.specification.vendor Java 虚拟机规范供应商 java.vm.specification.name Java 虚拟机规范名称 java.vm.version Java 虚