Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#5): Add java and javac methods to Jhome #6

Merged
merged 18 commits into from
Nov 22, 2023

Conversation

volodya-lombrozo
Copy link
Contributor

Add java and javac methods to Jhome.

Closes: #5.

@volodya-lombrozo
Copy link
Contributor Author

@yegor256 Could you take a look, please?

@yegor256
Copy link
Owner

@volodya-lombrozo in case of Java8 it's JRE, not JDK

@volodya-lombrozo
Copy link
Contributor Author

@yegor256 Take a look one more time, please

* @return The path of it
*/
public Path java() {
return this.home.resolve("bin").resolve("java");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo looks like code duplication to me. It's better to call path("bin/java") from here

* {@code Optional<Path>} is also a solution here.
*/
public Path javac() {
return this.home.resolve("bin").resolve("javac");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@volodya-lombrozo same here, looks like code duplication

@yegor256
Copy link
Owner

@volodya-lombrozo I made it work on Windows (see the changes in the test). Would be great if in your pull request you also update README and explain that calling .javac() is better than using "bin/java" because of .exe file name extension that is present in Windows but is absent in Ubuntu.

@volodya-lombrozo
Copy link
Contributor Author

@yegor256 Updated the PR according with your suggestions. Could you take a look one more time please?

@yegor256
Copy link
Owner

@volodya-lombrozo the tests don't pass on windows (

@volodya-lombrozo
Copy link
Contributor Author

volodya-lombrozo commented Nov 22, 2023

@yegor256 I fixed the problem with the Windows OS. Could you take a look, please?

@yegor256
Copy link
Owner

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Nov 22, 2023

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 2268a06 into yegor256:master Nov 22, 2023
14 checks passed
@rultor
Copy link
Collaborator

rultor commented Nov 22, 2023

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 3min)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java() and javac()
4 participants