Skip to content

Unable to locate the Javac Compiler in Java 8 #18

@kavsik

Description

@kavsik

Hello,
Good day. I have a maven project having the maven compiler plugin 2.5.1 for compiling the source during the build. When the JAVA_HOME variable points to JDK 8 installation directory (C:\DevEnv\ProgramFiles\Java\jdk1.8.0_20), im getting the error message Unable to locate the Javac Compiler in C:\DevEnv\ProgramFiles\Java\jdk1.8.0_20..\lib\tools.jar . The same runs with the Java 7 without any problem.

Observations :
when debugged, it ended up in the file JavacCompiler.java of artifact plexus-compiler-javac. The line System.getProperty( "java.home" ) in the compile process outputs differently for Java 8 and Java 7
For Java 7 - C:\DevEnv\ProgramFiles\Java\jdk1.7.0_80\jre
For Java 8 - C:\DevEnv\ProgramFiles\Java\jdk1.8.0_20

can you provide a fix to this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions