Skip to content

JAVA_HOME has to point to a JRE inside a JDK #1

@sdrab

Description

@sdrab

I just tried to build the training ressources with mvn package and experienced the following error:

[INFO] hadoop-skeleton .................................... FAILURE [  0.697 s]
…
[ERROR] Failed to execute goal on project hadoop-skeleton: Could not resolve dependencies for project de.dimajix.training:hadoop-skeleton:jar:1.0.0: Could not find artifact jdk.tools:jdk.tools:jar:1.8 at specified path /usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/tools.jar -> [Help 1]

My local solution was to set JAVA_HOME to a directory of a JRE that is located within a JDK. Thereafter, $JAVA_HOME/../lib/tools.jar (.. seems to go from the inner JRE into the outer JDK directory) can be successfully resolved and the build works on my machine.

I encountered this error on Windows 10 (that has this JDK/JRE-structure) as well as in my Ubuntu shell (that does not have this JDK/JRE-structure and I would have to create a symlink to satisfy the implicit assumption).

I see two possible solutions here:

  • fix the resolution of tools.jar
  • document the dependency to a JRE that is located inside a JDK in the README.md.

Hope this helps you,
Stephan

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