Maven error :Perhaps you are running on a JRE rather than a JDK?

后端 未结 20 2217
小鲜肉
小鲜肉 2020-11-30 21:32

I\'ve never worked with Maven before and I am following the instructions here. When I run the command

mvn integration-test -Pamp-to-war

It

相关标签:
20条回答
  • 2020-11-30 22:04

    This is because of running jre rather than jdk, to install jdk follow below steps

    Installing java 8 in amazon linux/redhat

    --> yum search java | grep openjdk

    --> yum install java-1.8.0-openjdk-headless.x86_64

    --> yum install java-1.8.0-openjdk-devel.x86_64

    --> update-alternatives --config java #pick java 1.8 and press 1

    --> update-alternatives --config javac #pick java 1.8 and press 2

    Thank You

    0 讨论(0)
  • 2020-11-30 22:06

    Check if /usr/bin has 'javac'. If not you have installed JRE & have to install jdk dev version like "java-1.8.0-openjdk-devel.x86_64"

    0 讨论(0)
提交回复
热议问题