解决Perhaps you are running on a JRE rather than a JDK?问题
来源:互联网 发布:淘宝 app 版本 编辑:程序博客网 时间:2024/05/17 23:37
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ helloworld ---
[INFO] Deleting H:\mavenok\helloworld\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory H:\mavenok\helloworld\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ helloworld ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to H:\mavenok\helloworld\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.781 s
[INFO] Finished at: 2015-03-25T11:22:14+08:00
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project helloworld: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
翻译过来就是,大哥,环境里没给编译器呀,可能你是用jre在玩耍,我要jdk~~
但是maven插件需要使用jdk,因此需要在eclipse修改Installed JRES
位置在-->【Window】-->【Prefrences】-->【Java】-->【Installed JREs】
详见下图。
这样就解决了这个问题,重新构建一下
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ helloworld ---
[INFO] Deleting H:\mavenok\helloworld\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory H:\mavenok\helloworld\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ helloworld ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to H:\mavenok\helloworld\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.117 s
[INFO] Finished at: 2015-03-25T11:45:51+08:00
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------
构建成功。
- 解决Perhaps you are running on a JRE rather than a JDK?问题
- 解决Perhaps you are running on a JRE rather than a JDK?问题
- 解决Perhaps you are running on a JRE rather than a JDK?问题
- 解决Perhaps you are running on a JRE rather than a JDK?问题
- 解决Perhaps you are running on a JRE rather than a JDK ?的问题
- Perhaps you are running on a JRE rather than JDK
- Maven整合解决Perhaps you are running on a JRE rather than a JDK?
- Perhaps you are running on a JRE rather than a JDK?问题
- maven:Perhaps you are running on a JRE rather than a JDK
- maven Perhaps you are running on a JRE rather than a JDK?
- Perhaps you are running on a JRE rather than a JDK?
- maven之Perhaps you are running on a JRE rather than a JDK
- Perhaps you are running on a JRE rather than a JDK?
- Maven项目出现Perhaps you are running on a JRE rather than a JDK?
- Perhaps you are running on a JRE rather than a JDK?
- \Perhaps you are running on a JRE rather than a JDK?
- maven build工程报错 Perhaps you are running on a JRE rather than a JDK
- maven spring-boot 报Perhaps you are running on a JRE rather than a JDK?
- 转载和积累系列 - 高性能网络库Libevent初探
- Android音频实时传输与播放(一):写在开头
- (素材源码)猫猫学IOS(二十)UI之UIPickerView_点菜系统
- Gradle version 1.10 is required. Current version is 2.2.1 :此类问题的一次性解决方案(已验证)
- 组合数学
- 解决Perhaps you are running on a JRE rather than a JDK?问题
- Android网络编程(二)ConnectivityManager和NetworkInfo详解
- solr模糊查询
- ubuntu环境下安装MyEclipse 10.6
- dyld: Library not loaded: @rpath/libswiftCore.dylib
- NSString / NSData / char* 类型之间的转换
- 01_spark1.3_RDD的开发
- Android音频实时传输与播放(二):服务端
- caffe源码解析 — net.cpp