Ant build not working: unable to find a javac compiler

后端 未结 8 2497
故里飘歌
故里飘歌 2020-12-15 05:46

I am trying to run some Java EE examples. Ant is suggesting: Perhaps JAVA_HOME does not point to the JDK. It is currently set to \"C:\\Program Files\\Java\\jre7

8条回答
  •  清歌不尽
    2020-12-15 05:57

    When you have both JRE and JDK installed in your system, please make sure JDK comes first in your PATH variable.

    I think system scans the PATH variable from left to right, whatever comes first is taken into consideration.

    In my case (with LinuxMint ) I was getting the same error. When I added JDK in PATH variable before JRE , it solved my problem.

提交回复
热议问题