No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
網上試了好多方法。。只有一個在settings里面添加這么一段的有用
<build>
? <plugins>
? <plugin>
? ? ? ? ? ? <artifactId>maven-compiler-plugin</artifactId>
? ? ? ? ? ? <version>3.1</version>
? ? ? ? ? ? <configuration>
? ? ? ? ? ? <fork>true</fork>
? ? ? ? ? ? <executable>E:/JAVA/jdk/bin/javac.exe</executable>
? ? ? ? ? ? </configuration>
? </plugin>
? </plugins>
? </build>
有大神告訴我能夠一勞永逸的方法嗎??
2017-02-07
jre是一個運行環境,不能編譯。你在window-》preferences-》java-》installed JRES -》add-》standard VM 將
jre home改成你的jdk的安裝目錄就可以了