Skip to content

add java_get_home#85

Merged
e-kotov merged 6 commits intomainfrom
57-create-a-function-to-get-current-java_home
Sep 22, 2025
Merged

add java_get_home#85
e-kotov merged 6 commits intomainfrom
57-create-a-function-to-get-current-java_home

Conversation

@e-kotov
Copy link
Owner

@e-kotov e-kotov commented Sep 22, 2025

New function java_get_home() to get currently set JAVA_HOME. This is just a shortcut to Sys.getenv("JAVA_HOME"), as it is faster to type and can be even faster then used with autocomplete.

Closes #57 .

@e-kotov e-kotov linked an issue Sep 22, 2025 that may be closed by this pull request
@e-kotov e-kotov requested a review from Copilot September 22, 2025 11:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new convenience function java_get_home() to retrieve the current JAVA_HOME environment variable value. The function provides a shortcut to Sys.getenv("JAVA_HOME") for improved developer experience.

  • New java_get_home() function that returns the JAVA_HOME environment variable
  • Function returns empty string when JAVA_HOME is not set
  • Comprehensive test coverage and documentation added

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
R/java_env.R Implements the new java_get_home() function with proper error handling
tests/testthat/test-java_env.R Adds test cases for both set and unset JAVA_HOME scenarios
man/java_get_home.Rd Generated documentation for the new function
NAMESPACE Exports the new function for public use
NEWS.md Documents the new feature in the changelog

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

e-kotov and others added 3 commits September 22, 2025 13:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@e-kotov e-kotov merged commit 45a5cdc into main Sep 22, 2025
6 of 7 checks passed
@e-kotov e-kotov deleted the 57-create-a-function-to-get-current-java_home branch September 22, 2025 11:56
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.

create a function to get current JAVA_HOME

1 participant