Skip to content

Commit

Permalink
feat(#5): handle extension correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Nov 22, 2023
1 parent 7ddac0d commit 5b60a44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/yegor256/Jhome.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public Path path(final String... loc) {
* @return The path of it
*/
public Path java() {
return this.path("bin/java").resolve(Jhome.extension());
return this.path(String.format("bin/java%s", Jhome.extension()));
}

/**
Expand All @@ -85,7 +85,7 @@ public Path java() {
* {@code Optional<Path>} is also a solution here.
*/
public Path javac() {
return this.path("bin/javac").resolve(Jhome.extension());
return this.path(String.format("bin/javac%s", Jhome.extension()));
}

/**
Expand Down

0 comments on commit 5b60a44

Please sign in to comment.