java - Error when trying to debug my code -


when trying debug code getting following error:

failed execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2  [info] ------------------------------------------------------------------------ [error] **failed execute goal org.apache.maven.plugins:maven-compiler-**plugin:2.0.2:compile (default-compile) on project napier-am: compilation failure unable locate javac compiler in:   c:\program files (x86)\java\jre6\..\lib\tools.jar please ensure using jdk 1.4 or above , not jre (the com.sun.tools.javac.main class required). in cases can change location of java installation setting java_home environment variable. -> [help 1] [error]  [error] see full stack trace of errors, re-run maven     -e switch. [error] re-run maven using -x switch enable full debug logging. [error]  [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojofailureexception 

maven uses java_home access java's location on machine. in situation point jre not jdk. set java_home environment variable , work.

if want have different location/version used maven can edit mvn.bat file this.

set java_home=<path_to_other_jdk> 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -