7.

JRE rather than a JDK? の原因と対処法

編集

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? の原因と対処法

Maven ビルド時にこのエラーが出る場合は、JDK ではなく JRE で実行していることが原因です。コンパイルには JDK が必要なので、実行環境を先に確認します。

起きやすい原因

  • JAVA_HOME が JRE を向いている
  • IDE の実行 JRE がそのままビルドに使われている
  • サーバーや CI 環境に JDK が入っていない

対処法

  • JDK をインストールする
  • JAVA_HOME を JDK に向ける
  • Maven 実行時の Java バージョンを確認する
編集
Post Share
子ページ

子ページはありません

同階層のページ
  1. java.lang.IllegalStateException: CGLIB is required to process @Configuration classes. Either add CGLIB to the classpath or remove the following @Configuration bean definitions: [...]
  2. Error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator
  3. No mapping found for HTTP request with URI ... in DispatcherServlet with name ...
  4. An internal error occurred during: "Building UI model". com/google/common/base/Function
  5. 【Springエラー】No identifier specified for entity : ...
  6. org.hibernate.hql.internal.ast.QuerySyntaxException: table_name is not mapped
  7. No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
  8. java.sql.SQLException: The server time zone value ... is unrecognized ...
  9. Caused by: java.lang.RuntimeException: Executing an update/delete query
  10. Not supported for DML operations【Springエラー】
  11. Field ... required a bean of type ... hat could not be found.
  12. Annotation-specified bean name ' ... ' for bean class [ ... ] conflicts with existing, non-compatible bean definition of same name and class [...]
  13. Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback.
  14. Exception in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/JarLauncher : Unsupported major.minor version 52.0