From f955e1637e760a08bbd23cbdff8e9b5784b9d672 Mon Sep 17 00:00:00 2001 From: e-kotov Date: Tue, 3 Sep 2024 15:00:54 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20e-kotov/?= =?UTF-8?q?rJavaEnv@20bc15aa1f55fb892024a1c3207a21db35f952f4=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 ++-- pkgdown.yml | 2 +- search.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 05aada2..c15d47f 100644 --- a/index.html +++ b/index.html @@ -86,7 +86,7 @@ -

Quickly install Java Development Kit (JDK) without administrative priviliges and set environment variables in current R session or project to solve common issues with ‘Java’ environment management in ‘R’. Recommended to users of Java/rJava-dependent R packages such as r5r, opentripplanner, xlsx, {openNLP}, {rWeka}, RJDBC, tabulapdf, and many more. rJavaEnv prevents common problems like Java not found, Java version conflicts, missing Java installations, and the inability to install Java due to lack of administrative privileges. rJavaEnv automates the download, installation, and setup of the Java on a per-project basis by setting the relevant JAVA_HOME in the current R session or the current working directory (via .Rprofile, with the user’s consent). Similar to what renv does for R packages, rJavaEnv allows different Java versions to be used across different projects, but can also be configured to allow multiple versions within the same project (e.g. with the help of targets package). Note: there are a few extra steps for ‘Linux’ users, who don’t have any ‘Java’ previously installed in their system, and who prefer package installation from source, rather then installing binaries from ‘Posit Package Manager’. See documentation for details.

+

Quickly install Java Development Kit (JDK) without administrative privileges and set environment variables in current R session or project to solve common issues with ‘Java’ environment management in ‘R’. Recommended to users of Java/rJava-dependent R packages such as r5r, opentripplanner, xlsx, {openNLP}, {rWeka}, RJDBC, tabulapdf, and many more. rJavaEnv prevents common problems like Java not found, Java version conflicts, missing Java installations, and the inability to install Java due to lack of administrative privileges. rJavaEnv automates the download, installation, and setup of the Java on a per-project basis by setting the relevant JAVA_HOME in the current R session or the current working directory (via .Rprofile, with the user’s consent). Similar to what renv does for R packages, rJavaEnv allows different Java versions to be used across different projects, but can also be configured to allow multiple versions within the same project (e.g. with the help of targets package). Note: there are a few extra steps for ‘Linux’ users, who don’t have any ‘Java’ previously installed in their system, and who prefer package installation from source, rather then installing binaries from ‘Posit Package Manager’. See documentation for details.

Install

@@ -104,7 +104,7 @@

Install install.packages("remotes") } -remotes::install_github("e-kotov/rJavaEnv")

+remotes::install_github("e-kotov/rJavaEnv", force = TRUE)

Simple Example diff --git a/pkgdown.yml b/pkgdown.yml index 7f87ce3..6b4760d 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -6,7 +6,7 @@ articles: rJavaEnv-step-by-step: rJavaEnv-step-by-step.html rJavaEnv: rJavaEnv.html why-rJavaEnv: why-rJavaEnv.html -last_built: 2024-09-03T12:48Z +last_built: 2024-09-03T15:00Z urls: reference: https://www.ekotov.pro/rJavaEnv/reference article: https://www.ekotov.pro/rJavaEnv/articles diff --git a/search.json b/search.json index 309e982..3cc7957 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement kotov.egor@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to rJavaEnv","title":"Contributing to rJavaEnv","text":"outlines propose change rJavaEnv. detailed discussion contributing tidyverse packages, please see development contributing guide code review principles.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to rJavaEnv","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to rJavaEnv","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees ’s needed. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed). See guide create great issue advice.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to rJavaEnv","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"e-kotov/rJavaEnv\", fork = TRUE). Install development dependencies devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. user-facing changes, add bullet top NEWS.md (.e. just first header). Follow style described https://style.tidyverse.org/news.html.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to rJavaEnv","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to rJavaEnv","text":"Please note rJavaEnv project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 rJavaEnv authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/multiple-java-with-targets-callr.html","id":"how-to-use-use_java","dir":"Articles","previous_headings":"","what":"How to use use_java()","title":"Multiple Java environments in one project with targets and callr","text":"Let’s illustrate simple example. First, load package check valid major versions Java: Now select two three versions run use_java(), checking every time correct java set current environment. probably wait bit Java distribution downloaded unpacked. However, now repeat commands, see correct Java version set instantly, downloading unpacking skipped.","code":"library(rJavaEnv) getOption(\"rJavaEnv.valid_major_java_versions\") [1] \"8\" \"11\" \"17\" \"21\" \"22\" use_java(\"8\") \"8\" == java_check_version_cmd(quiet = TRUE) \"8\" == java_check_version_rjava(quiet = TRUE) [1] TRUE [1] TRUE use_java(17) \"17\" == java_check_version_cmd(quiet = TRUE) \"17\" == java_check_version_rjava(quiet = TRUE) [1] TRUE [1] TRUE use_java(21) \"21\" == java_check_version_cmd(quiet = TRUE) \"21\" == java_check_version_rjava(quiet = TRUE) [1] TRUE [1] TRUE"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/multiple-java-with-targets-callr.html","id":"how-to-use-with-targets-and-callr","dir":"Articles","previous_headings":"","what":"How to use with targets and callr","title":"Multiple Java environments in one project with targets and callr","text":"{targets} {callr} packages allow user run R scripts clean separate R sessions. essentially allows user run multiple versions Java one project targets callr, mostly overcoming issue manually switching Java versions one project. One simple thing can one scripts needs Java 8, another one needs Java 17, insert use_java() beginning scripts run targets callr like : : first run script go process downloading unpacking Java distribution. second run need download unpacking instant. need runs instant first attempt, can predownload pre-install Java cache folders using:","code":"library(rJavaEnv) use_java(\"17\") rJavaEnv::use_java(\"17\") java_17_distrib <- java_download(\"17\") java_unpack(java_17_distrib)"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"set-up-cache-folder-location","dir":"Articles","previous_headings":"","what":"1. Set-up cache folder location","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"can specify cache folder location rJavaEnv.cache_path option. default location set whichever path returned tools::R_user_dir(\"rJavaEnv\", = \"cache\"). exact path depend operating system. recommendation leave option ’s default setting. similar renv package manages cache R packages. can view current cache location : Expected output (Windows machine): Expected output (macOS machine):","code":"options(rJavaEnv.cache_path = \"/path/to/your/desired/cache/folder\") getOption(\"rJavaEnv.cache_path\") \"C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv\" \"/Users/user_name/Library/Caches/org.R-project.R/R/rJavaEnv\""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"download-java-jdk-distributions","dir":"Articles","previous_headings":"","what":"2. Download Java JDK distributions","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"download specific Java distribution, use java_download function: Expected output (Windows machine): function download specified version Java JDK (currently defaults supported Corretto distribution Amazon, added new package releases). function returns path downloaded distribution file, just zip gz archive. default, cache_path specified calling java_download(), distribution downloaded folder defined getOption(\"rJavaEnv.cache_path\"). argument can override globally set cache folder location single download. java_download() also allows define operating system processor architecture function arguments platform arch (please see function documentation using ?rJavaEnv::java_download). example, may useful packaging Java distribution Linux using Windows macOS machine. may also useful reason automatic OS CPU detection fails. example, line download Amazon Corretto Java JDK version 8 x86-64 Linux, even though may running code aarch64 macOS x86_64 Windows machine: Example expected output (Windows machine):","code":"java_17_distr <- java_download(version = 17) java_17_distr Detected platform: windows Detected architecture: x64 You can change the platform and architecture by specifying the `platform` and `arch` arguments. Downloading Java 17 (Corretto) for windows x64 to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-17-x64-windows-jdk.zip [100%] Downloaded 187323560 bytes... Download completed. MD5 checksum verified. [1] \"C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-17-x64-windows-jdk.zip\" java_8_linux64_distr <- java_download( version = 8, platform = \"linux\", arch = \"x64\" ) Detected platform: linux Detected architecture: x64 You can change the platform and architecture by specifying the `platform` and `arch` arguments. Downloading Java 8 (Corretto) for linux x64 to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-8-x64-linux-jdk.tar.gz [100%] Downloaded 118096667 bytes... Download completed. MD5 checksum verified."},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"manage-downloaded-java-jdk-distributions","dir":"Articles","previous_headings":"","what":"3. Manage downloaded Java JDK distributions","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"can manage downloaded distributions java_list java_clear functions. Expected output (Windows machine): Example expected output (Windows machine): can also delete downloaded distributions without consent : Example expected output:","code":"java_list(\"distrib\") java_distr_path 1 C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-17-x64-windows-jdk.zip 2 C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-21-x64-windows-jdk.zip 3 C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-8-x64-linux-jdk.tar.gz java_clear(\"distrib\") i Existing Java distributions: 1: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-17-x64-windows-jdk.zip 2: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-21-x64-windows-jdk.zip 3: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-8-x64-linux-jdk.tar.gz i Enter the number of the distribution to delete, 'all' to delete all, or '0' or any other character to cancel: java_clear(\"distrib\", delete_all = TRUE) Java distributions cache cleared."},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"install-from-downloaded-java-jdk-distributions-into-current-project","dir":"Articles","previous_headings":"","what":"4. Install from downloaded Java JDK distributions into current project","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"cleared downloaded Java distributions, let us re-download : Now downloaded Java distributions, can install one project. Installation context rJavaEnv means extracting distribution installed cache folder (root cache directory zip archives distributions), linking files (via symlinks macOS Linux, junctions Windows1). set autoset_java_env argument FALSE need set JAVA_HOME PATH environment variables manually. Example expected output (Windows machine): leave autoset_java_env = TRUE default option, install_java() function automatically set JAVA_HOME PATH environment variables manually current R session current project/working directory writing lines .Rprofile file current working directory. way time start R session, JAVA_HOME PATH environment variables set correct path installed Java distribution. Alternatively, may want install Java project, just unpack distribution cache folder. , can use java_unpack() function, passing path downloaded Java distribution : java_unpack return full path unpacked Java distribution can use set environment variables section using java_env_set().","code":"java_8_distr <- java_download(8) java_17_distr <- java_download(17) java_22_distr <- java_download(22) java_install( java_distrib_path = java_17_distr, autoset_java_env = FALSE) Java 17 (amazon-corretto-17-x64-windows-jdk.zip) for windows x64 installed at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/17 and symlinked to C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 java_home <- java_unpack(java_distr_path = java_8_distr)"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"manually-set-installed-java-environment","dir":"Articles","previous_headings":"","what":"5. Manually set installed Java environment","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"Let us install another downloaded Java distribution, time autoset_java_env = TRUE: Expected output (Windows machine): can now list Java versions installed project directory: Expected output (Windows machine): first installed Java 17 autoset_java_env = FALSE, installed Java 8 autoset_java_env = TRUE. check version currently set JAVA_HOME environment variable, get second installed Java version, Java 8. Expected output (Windows machine): switch Java 17 need manually set JAVA_HOME PATH environment variables java_env_set(). identify path pass java_env_set(), can use java_list(\"project\") function : Expected output (Windows machine): can see, Java 17 currently number 1 list, save path: Expected output (Windows machine): Now can reuse path java_env_set() function: Expected output (Windows machine): finally can double check version Java going picked Java/rJava-dependent R package going use : Expected output (Windows machine):","code":"java_install( java_distrib_path = java_8_distr, autoset_java_env = TRUE) Java distribution amazon-corretto-8-x64-windows-jdk.zip already unpacked at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8 v Current R Session: JAVA_HOME and PATH set to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8 v Current R Project/Working Directory: JAVA_HOME and PATH set to 'C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8' in .Rprofile at 'C:/Users/user_name/AppData/Local/Temp/75/R tmp0MasTW' Java 8 (amazon-corretto-8-x64-windows-jdk.zip) for windows x64 installed at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8 and symlinked to C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/8 java_list(\"project\") path platform arch version 1 C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 windows x64 17 2 C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/8 windows x64 8 java_check_version_cmd() JAVA_HOME: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8 Java path: /c/Users/user_name/AppData/Local/R/cache/R/rJavaEnv/installed/windows/x64/8/bin/java Java version: \"openjdk version \\\"1.8.0_422\\\" OpenJDK Runtime Environment Corretto-8.422.05.1 (build 1.8.0_422-b05) OpenJDK 64-Bit Server VM Corretto-8.422.05.1 (build 25.422-b05, mixed mode)\" [1] TRUE java_list(\"project\") path platform arch version 1 C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 windows x64 17 2 C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/8 windows x64 8 java_home_17 <- java_list(\"project\", output = \"vector\")[1] java_home_17 \"C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17\" java_env_set(where = \"both\", java_home = java_home_17) v Current R Session: JAVA_HOME and PATH set to C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 v Current R Project/Working Directory: JAVA_HOME and PATH set to 'C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17' in .Rprofile at 'C:/Users/user_name/AppData/Local/Temp/75/R tmp0MasTW' java_check_version_cmd() # for pacakges that use Java via commandline, like opentripplanner java_check_version_rjava() # for packages that use Java via `rJava`, like r5r JAVA_HOME: C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 Java path: /c/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17/bin/java Java version: \"openjdk version \\\"17.0.12\\\" 2024-07-16 LTS OpenJDK Runtime Environment Corretto-17.0.12.7.1 (build 17.0.12+7-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.12.7.1 (build 17.0.12+7-LTS, mixed mode, sharing)\" [1] TRUE Using current session's JAVA_HOME: C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 With the user-specified JAVA_HOME rJava and other rJava/Java-based packages will use Java version: \"17.0.12\" [1] TRUE"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"cleanup","dir":"Articles","previous_headings":"","what":"6. Cleanup","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"want use rJavaEnv anymore, please clear cache folders removing package: Also, clear .Rprofile file projects used package:","code":"java_clear(\"project\", delete_all = TRUE) java_clear(\"installed\", delete_all = TRUE) java_clear(\"distrib\", delete_all = TRUE) java_env_unset()"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"quickly-download-and-install-java","dir":"Articles","previous_headings":"","what":"1. Quickly Download and Install Java","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Install rJavaEnv CRAN: install latest version rJavaEnv R universe: Assume project directory currently temporary directory. Feel free skip , already working desired project directory like install Java. example outputs see paths point temporary directory, real project see project directory instead. first time run function requires writing home space, provided prompt warning package may write package cache folder home directory, current project directory, well .Rprofile file project directory (directory specify). quickly install Java JDK 21 (also default, specified) current project directory set environment: first run, asked consent change environment variables .Rprofile file current working/project directory. happens . command : Downloads Java distribution compatible OS architecture. Installs Java cache directory. Sets JAVA_HOME PATH environment variables current session project/working directory, Java/rJava dependent R package can use requested Java version. Example expected output (Windows machine): . can now use Java/rJava-dependent R package.","code":"install.packages(\"rJavaEnv\") install.packages('rJavaEnv', repos = c('https://e-kotov.r-universe.dev', 'https://cloud.r-project.org') ) project_dir <- tempdir() setwd(project_dir) library(rJavaEnv) java_quick_install(version = 21) Consent has been granted and recorded. Detected platform: windows Detected architecture: x64 You can change the platform and architecture by specifying the `platform` and `arch` arguments. Downloading Java 21 (Corretto) for windows x64 to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-21-x64-windows-jdk.zip [100%] Downloaded 201696048 bytes... Download completed. MD5 checksum verified. v Current R Session: JAVA_HOME and PATH set to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 v Current R Project/Working Directory: JAVA_HOME and PATH set to 'C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21' in .Rprofile at 'C:/Users/user_name/AppData/Local/Temp/75/ RtmpuoG3xJ' Java 21 (amazon-corretto-21-x64-windows-jdk.zip) for windows x64 installed at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 and symlinked to C:/Users/user_name/AppData/Local/Temp/75/RtmpuoG3xJ/rjavaenv/windows/x64/21"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"install-rjavaenv","dir":"Articles","previous_headings":"","what":"Install rJavaEnv","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Install rJavaEnv CRAN: install latest version rJavaEnv R universe:","code":"install.packages(\"rJavaEnv\") install.packages('rJavaEnv', repos = c('https://e-kotov.r-universe.dev', 'https://cloud.r-project.org') )"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"quick-install-java-jdk","dir":"Articles","previous_headings":"","what":"Quick Install Java JDK","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Assume project directory currently temporary directory. Feel free skip , already working desired project directory like install Java. example outputs see paths point temporary directory, real project see project directory instead. first time run function requires writing home space, provided prompt warning package may write package cache folder home directory, current project directory, well .Rprofile file project directory (directory specify). quickly install Java JDK 21 (also default, specified) current project directory set environment: first run, asked consent change environment variables .Rprofile file current working/project directory. happens . command : Downloads Java distribution compatible OS architecture. Installs Java cache directory. Sets JAVA_HOME PATH environment variables current session project/working directory, Java/rJava dependent R package can use requested Java version. Example expected output (Windows machine): . can now use Java/rJava-dependent R package.","code":"project_dir <- tempdir() setwd(project_dir) library(rJavaEnv) java_quick_install(version = 21) Consent has been granted and recorded. Detected platform: windows Detected architecture: x64 You can change the platform and architecture by specifying the `platform` and `arch` arguments. Downloading Java 21 (Corretto) for windows x64 to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-21-x64-windows-jdk.zip [100%] Downloaded 201696048 bytes... Download completed. MD5 checksum verified. v Current R Session: JAVA_HOME and PATH set to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 v Current R Project/Working Directory: JAVA_HOME and PATH set to 'C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21' in .Rprofile at 'C:/Users/user_name/AppData/Local/Temp/75/ RtmpuoG3xJ' Java 21 (amazon-corretto-21-x64-windows-jdk.zip) for windows x64 installed at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 and symlinked to C:/Users/user_name/AppData/Local/Temp/75/RtmpuoG3xJ/rjavaenv/windows/x64/21"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"check-java-installation","dir":"Articles","previous_headings":"","what":"2. Check Java installation","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"can check newly installed Java correctly picked Java/rJava-dependent R package going use . R packages use Java via rJava-dependency (e.g. r5r), can use following command: Example expected output (Windows machine): R packages use Java command line (e.g. opentripplanner), can use following command: Example expected output (Windows machine): Note: Linux system Java version previoulsy installed using pre-build R package binaries (example ‘Posit Package Manager’) instead install R packages source, step may quit R, follow steps set configure Java R, install rJava, otherwise rJava built source.*","code":"java_check_version_rjava() Using current session's JAVA_HOME: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 With the user-specified JAVA_HOME rJava and other rJava/Java-based packages will use Java version: \"21.0.4\" [1] TRUE java_check_version_cmd() java_check_version_cmd() JAVA_HOME: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 Java path: /c/Users/user_name/AppData/Local/R/cache/R/rJavaEnv/installed/windows/x64/21/bin/java Java version: \"openjdk version \\\"21.0.4\\\" 2024-07-16 LTS OpenJDK Runtime Environment Corretto-21.0.4.7.1 (build 21.0.4+7-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.4.7.1 (build 21.0.4+7-LTS, mixed mode, sharing)\" [1] TRUE"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"note-linux","dir":"Articles","previous_headings":"","what":"Note for Linux users","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Note: Linux system Java version previoulsy installed using pre-build R package binaries (example ‘Posit Package Manager’) instead install R packages source, step may quit R, follow steps set configure Java R, install rJava, otherwise rJava built source.*","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"return-things-to-their-original-state","dir":"Articles","previous_headings":"","what":"3. Return things to their original state","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Run following code unset Java current working directory: Example expected output (Windows machine): line clears Java installations project directory: Example expected output: Now restart current R session R picks system Java (Java, installed system).","code":"java_env_unset() Removed JAVA_HOME settings from .Rprofile in 'C:/Users/user_name/AppData/Local/Temp/75/RtmpuoG3xJ/.Rprofile' java_clear(\"project\", delete_all = TRUE) All Java symlinks in the project have been cleared."},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"unset-java","dir":"Articles","previous_headings":"","what":"Unset Java","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Run following code unset Java current working directory: Example expected output (Windows machine):","code":"java_env_unset() Removed JAVA_HOME settings from .Rprofile in 'C:/Users/user_name/AppData/Local/Temp/75/RtmpuoG3xJ/.Rprofile'"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"delete-java-from-the-project-directory","dir":"Articles","previous_headings":"","what":"Delete Java from the project directory","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"line clears Java installations project directory: Example expected output: Now restart current R session R picks system Java (Java, installed system).","code":"java_clear(\"project\", delete_all = TRUE) All Java symlinks in the project have been cleared."},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"complete-cleanup","dir":"Articles","previous_headings":"","what":"4. Complete Cleanup","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"want use rJavaEnv anymore, please clear cache folders removing package: Also, clear .Rprofile file projects used package: Now can remove package restart current R session R picks system Java (Java, installed system).","code":"java_clear(\"project\", delete_all = TRUE) java_clear(\"installed\", delete_all = TRUE) java_clear(\"distrib\", delete_all = TRUE) java_env_unset()"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/why-rJavaEnv.html","id":"overall-popularity-of-java-dependent-r-packages","dir":"Articles","previous_headings":"","what":"Overall popularity of Java-dependent R packages","title":"Why rJavaEnv: the landscape of ‘Java’-dependent R packages","text":"popular widely known highly popular ggplot2 data.table packages, rJava-dependent packages (104 CRAN another 14 Bioconductor) (consequently, rJava ) widely used R community (see Figure 1). rJava (Urbanek 2024) downloaded 198,761 times May, 2024. total number downloads rJava-dependent packages 301,259 CRAN 5,368 Bioconductor. put context, ggplot2 downloaded 1,891,742 times data.table downloaded 846,726 times May, 2024. rJava-based packages collectively 6.3 times less popular ggplot2, noticeable number users. Figure 1: CRAN Downloads Time rJava rJava-dependent Packages, compared popular ggplot2 data.table context Note analysis covers packages available CRAN Bioconductor explicitly depend rJava package. packages use Java depend rJava package. example, {opentripplanner} package also relies underlying Java-based software calls command line. , however, also requires system environment variables set correctly. Identifying packages opentripplanner complicated, direct dependency rJava package. can assume many compared depend rJava.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/why-rJavaEnv.html","id":"individual-java-dependent-packages","dir":"Articles","previous_headings":"","what":"Individual Java-dependent packages","title":"Why rJavaEnv: the landscape of ‘Java’-dependent R packages","text":"zoom individual rJava-dependent packages, see Figure 2, downloads generated xlsx “companion” xlsxjars. Figure 2: CRAN Downloads Time rJava-dependent Packages remove xlsx (xlsxjars) outlier, see Figure 3), top packages : r5r “rapid realistic routing multimodal transport networks (walk, bike, public transport car)” (Pereira et al. 2021). package users experience multiple issues Java report GitHub, just examples include 1, 2, 3 many . RJDBC “[p]rovides Access Databases JDBC Interface” (Urbanek 2022). able find bug tracker package, simple web search reveals multiple issues one StackOverflow. mailR “send[ing] emails R” (Premraj 2021) (Java related issue GitHub). Web search also reveals StackOverflow discussions related Java version issues. RWeka, R interface Weka. Weka “collection machine learning algorithms data mining tasks written Java” (Hornik, Buchta, Zeileis 2009). StackOverflow discussions related Java version issues. Figure 3: CRAN Downloads Time top 20 rJava-dependent Packages packages: openNLP. “OpenNLP library machine learning based toolkit processing natural language text written Java” (Hornik 2019). also Java related issues discussed StackOverflow. xlsx. “R package interact Excel files using Apache POI [J]ava library” (Dragulescu Arendt 2020). Also many discussions StackOverflow GitHub. summarize, regardless Java-dependent R package used, users consistently encounter issues correct Java runtime installed system. Additionally, may using various R packages depend different Java versions, complicating management Java environment variables. task particularly challenging ordinary users simply want get analysis running smoothly efficiently.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/why-rJavaEnv.html","id":"rjavaenv-r-package-as-a-solution","dir":"Articles","previous_headings":"","what":"rJavaEnv R package as a solution","title":"Why rJavaEnv: the landscape of ‘Java’-dependent R packages","text":"rJavaEnv aims assist users Java/rJava-dependent packages providing functions quickly install required Java version set environment variables. ensures packages user plans use pick correct Java version minimal intervention user’s system. Compared manually downloading Java Oracle, Amazon, another vendor installing using installer, rJavaEnv downloads non-installer archives Java, extracts cache folder, links current project working directory. way, rJavaEnv contaminate user’s machine unnecessary installations configurations. Furthermore, rJavaEnv streamlines process, allowing users focus analysis without worrying complex Java setup issues. automating tasks, rJavaEnv reduces potential errors ensures smoother experience users need manage multiple Java-dependent R packages.","code":""},{"path":[]},{"path":"https://www.ekotov.pro/rJavaEnv/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Egor Kotov. Author, maintainer, copyright holder. Mauricio Vargas. Contributor. Hadley Wickham. Contributor. use_java feature suggestion PR review","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kotov E (2024). rJavaEnv: Java Environments R Projects. doi:10.32614/CRAN.package.rJavaEnv, https://github.com/e-kotov/rJavaEnv.","code":"@Manual{rjavaenv, title = {rJavaEnv: Java Environments for R Projects}, author = {Egor Kotov}, year = {2024}, url = {https://github.com/e-kotov/rJavaEnv}, doi = {10.32614/CRAN.package.rJavaEnv}, }"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"rjavaenv-java-environments-for-r-projects-","dir":"","previous_headings":"","what":"rJavaEnv: `Java` Environments for R Projects","title":"rJavaEnv: `Java` Environments for R Projects","text":"Quickly install Java Development Kit (JDK) without administrative priviliges set environment variables current R session project solve common issues ‘Java’ environment management ‘R’. Recommended users Java/rJava-dependent R packages r5r, opentripplanner, xlsx, {openNLP}, {rWeka}, RJDBC, tabulapdf, many . rJavaEnv prevents common problems like Java found, Java version conflicts, missing Java installations, inability install Java due lack administrative privileges. rJavaEnv automates download, installation, setup Java per-project basis setting relevant JAVA_HOME current R session current working directory (via .Rprofile, user’s consent). Similar renv R packages, rJavaEnv allows different Java versions used across different projects, can also configured allow multiple versions within project (e.g. help targets package). Note: extra steps ‘Linux’ users, don’t ‘Java’ previously installed system, prefer package installation source, rather installing binaries ‘Posit Package Manager’. See documentation details.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"install","dir":"","previous_headings":"","what":"Install","title":"rJavaEnv: `Java` Environments for R Projects","text":"Install CRAN: Install latest release R-multiverse: can also install development version rJavaEnv GitHub:","code":"install.packages('rJavaEnv') install.packages('rJavaEnv', repos = c('https://community.r-multiverse.org', 'https://cloud.r-project.org') ) if (!requireNamespace(\"remotes\", quietly = TRUE)) { install.packages(\"remotes\") } remotes::install_github(\"e-kotov/rJavaEnv\")"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"simple-example","dir":"","previous_headings":"","what":"Simple Example","title":"rJavaEnv: `Java` Environments for R Projects","text":": download Java 21 distribution compatible current operating system processor architecture local cache folder; extract downloaded Java distribution another cache folder; create symbolic link (macOS Linux) junction (Windows, fails, just copies files) rjavaenv/platform/processor_architecture/java_version current directory/project point cached installation; set current session’s JAVA_HOME PATH environment variables point installed (symlinked) Java distribution; add code .Rprofile file current directory/project set JAVA_HOME PATH environment variables project opened RStudio. part normal operation, rJavaEnv update JAVA_HOME PATH environment variables current R session, local cache R package library, .Rprofile file project/current working directory. line CRAN policies, explicit user consent required making changes. Therefore, first time run function rJavaEnv makes changes, asked consent. explicitly consent /prevent interruptions non-interactive mode, can use rje_consent() function:","code":"rJavaEnv::java_quick_install(version = 21) rje_consent(provided = TRUE)"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"using-rjavaenv-with-targets-and-callr","dir":"","previous_headings":"","what":"Using rJavaEnv with targets and callr","title":"rJavaEnv: `Java` Environments for R Projects","text":"Just insert line begining script run targets callr: acts exactly like java_quick_install(), sets environment variables current session copy link Java binaries project directory. details vignette Multiple Java environments one project targets callr.","code":"rJavaEnv::use_java(\"21\")"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"cleanup","dir":"","previous_headings":"","what":"Cleanup","title":"rJavaEnv: `Java` Environments for R Projects","text":"want use rJavaEnv anymore, please clear cache folders removing package: Also, clear .Rprofile file projects used package:","code":"java_clear(\"project\", delete_all = TRUE) java_clear(\"installed\", delete_all = TRUE) java_clear(\"distrib\", delete_all = TRUE) java_env_unset()"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"functions-overview","dir":"","previous_headings":"","what":"Functions Overview","title":"rJavaEnv: `Java` Environments for R Projects","text":"package several core functions: Downloads, installs, sets Java environment current working/project directory, one line code. Checks installed Java version using terminal commands. packages like opentripplanner, performs Java calls using command line. Checks installed Java version using rJava separate R session. rJava-dependent packages r5r. Downloads specified version distribution Java. Installs Java distribution file current (user-specified) project directory. Sets JAVA_HOME PATH environment variables given path current R session /.Rprofile file project directory. Remove JAVA_HOME PATH environment variables .Rrpofile file project directory (current R session, please restart session R picks system Java). Lists Java versions linked current project (cached distributions installations). Removes Java versions linked current project (cached distributions installations). use_java() java_quick_install(), less intrusive way. copy link Java installation folder cache project directory create edit .Rprofile file. sets requested java current R session. See details functions Reference. detailed usage, see Quick Start Vignette (work progress).","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"limitations","dir":"","previous_headings":"","what":"Limitations","title":"rJavaEnv: `Java` Environments for R Projects","text":"Currently, rJavaEnv supports major Java versions 8, 11, 17, 21, 22. download install functions ignore minor version Java distribution just downloads latest stable subversion specified major version. done simplify process avoid need update package every time new minor version Java released. users sufficient, substandard full reproducibility. main limitation want switch another Java environment, likely restart current R session set JAVA_HOME PATH environment variables desired Java environment using rJavaEnv::java_env_set(). done dynamically within R session due way Java initialized R, particularly rJava-dependent packages r5r. packages like opentripplanner, performs Java calls using command line, can switch Java environments dynamically within R session much want. Therefore, need use R packages depend different Java versions within project, create separate R scripts Java environment run separate R sessions. One effective way use callr package run R scripts separate R sessions. Another option use targets package manage whole project workflow, , side effect, lead R scripts run separate R sessions. use rJavaEnv targets, need download install several Java environments using rJavaEnv::java_download() rJavaEnv::java_install() set relevant path rJavaEnv::java_env_set() beginning function requires certain Java version.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"future-work","dir":"","previous_headings":"","what":"Future work","title":"rJavaEnv: `Java` Environments for R Projects","text":"future work includes: Add support Java distributions versions Take care R CMD javareconf Possibly add support specifying Java version beyond major version Possibly allow downloading several Java distributions one function call, e.g. different major versions ‘flavour’ different ‘flavours’ major version Possibly add automation get Java required specific Java-dependent R packages open suggestions contributions, welcome issues pull requests.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"rJavaEnv: `Java` Environments for R Projects","text":"thank rOpenSci Dev Guide, well Hadley Wickham Jennifer Bryan R Packages book. Package hex sticker logo partially generated DALL-E OpenAI. logo also contains original R logo.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"rJavaEnv: `Java` Environments for R Projects","text":"cite package ‘rJavaEnv’ publications use: Kotov E (2024). rJavaEnv: Java Environments R Projects. doi:10.32614/CRAN.package.rJavaEnv https://doi.org/10.32614/CRAN.package.rJavaEnv, https://github.com/e-kotov/rJavaEnv. BibTeX:","code":"@Manual{rjavaenv, title = {rJavaEnv: Java Environments for R Projects}, author = {Egor Kotov}, year = {2024}, url = {https://github.com/e-kotov/rJavaEnv}, doi = {10.32614/CRAN.package.rJavaEnv}, }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/global_quiet_param.html","id":null,"dir":"Reference","previous_headings":"","what":"Global Quiet Parameter — global_quiet_param","title":"Global Quiet Parameter — global_quiet_param","text":"Documentation quiet parameter, used globally.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/global_quiet_param.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Global Quiet Parameter — global_quiet_param","text":"","code":"global_quiet_param(quiet)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/global_quiet_param.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Global Quiet Parameter — global_quiet_param","text":"quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":null,"dir":"Reference","previous_headings":"","what":"Check installed Java version using terminal commands — java_check_version_cmd","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"Check installed Java version using terminal commands","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"","code":"java_check_version_cmd(java_home = NULL, quiet = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"java_home Path Java home directory. NULL, function uses JAVA_HOME environment variable. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"character vector length 1 containing major Java version.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"","code":"java_check_version_cmd() #> JAVA_HOME: /usr/lib/jvm/temurin-11-jdk-amd64 #> Java path: /usr/bin/java #> Java version: \"openjdk version \\\"11.0.24\\\" 2024-07-16 OpenJDK Runtime #> Environment Temurin-11.0.24+8 (build 11.0.24+8) OpenJDK 64-Bit Server VM #> Temurin-11.0.24+8 (build 11.0.24+8, mixed mode)\" #> [1] \"11\""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"function sets JAVA_HOME environment variable, initializes JVM using rJava, prints Java version used user sets given JAVA_HOME current R session. check performed separate R session avoid reload current R session. reason Java initialized R session, uninitialized unless current R session restarted.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"","code":"java_check_version_rjava(java_home = NULL, quiet = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"java_home Path Java home directory. NULL, function uses JAVA_HOME environment variable. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"character vector length 1 containing major Java version.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"","code":"if (FALSE) { # \\dontrun{ java_check_version_rjava() } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_system.html","id":null,"dir":"Reference","previous_headings":"","what":"Check and print Java path and version using system commands — java_check_version_system","title":"Check and print Java path and version using system commands — java_check_version_system","text":"function checks Java executable path retrieves Java version, prints details console.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_system.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check and print Java path and version using system commands — java_check_version_system","text":"","code":"java_check_version_system(quiet)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_system.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check and print Java path and version using system commands — java_check_version_system","text":"quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_system.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check and print Java path and version using system commands — java_check_version_system","text":"character vector length 1 containing major Java version.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage Java installations and distributions caches — java_clear","title":"Manage Java installations and distributions caches — java_clear","text":"Wrapper function clear Java symlinked current project, installed, distributions caches.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage Java installations and distributions caches — java_clear","text":"","code":"java_clear( type = c(\"project\", \"installed\", \"distrib\"), target_dir = NULL, check = TRUE, delete_all = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage Java installations and distributions caches — java_clear","text":"type clear: \"project\" - remove symlinks install cache current project, \"installed\" - remove installed Java versions, \"distrib\" - remove downloaded Java distributions. target_dir directory clear. Defaults current working directory \"project\" user-specific data directory \"installed\" \"distrib\". recommended change. check Whether list contents cache directory clearing . Defaults TRUE. delete_all Whether delete items without prompting. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Manage Java installations and distributions caches — java_clear","text":"message indicating whether cache cleared .","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage Java installations and distributions caches — java_clear","text":"","code":"if (FALSE) { # \\dontrun{ java_clear(\"project\", target_dir = tempdir()) java_clear(\"installed\", target_dir = tempdir()) java_clear(\"distrib\", target_dir = tempdir()) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_distrib_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear the Java distributions cache folder — java_clear_distrib_cache","title":"Clear the Java distributions cache folder — java_clear_distrib_cache","text":"Clear Java distributions cache folder","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_distrib_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear the Java distributions cache folder — java_clear_distrib_cache","text":"","code":"java_clear_distrib_cache( cache_path = getOption(\"rJavaEnv.cache_path\"), check = TRUE, delete_all = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_distrib_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear the Java distributions cache folder — java_clear_distrib_cache","text":"cache_path cache directory clear. Defaults user-specific data directory. check Whether list contents cache directory clearing . Defaults TRUE. delete_all Whether delete items without prompting. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_distrib_cache.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clear the Java distributions cache folder — java_clear_distrib_cache","text":"message indicating whether cache cleared .","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_in_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear the Java versions symlinked in the current project — java_clear_in_project","title":"Clear the Java versions symlinked in the current project — java_clear_in_project","text":"Clear Java versions symlinked current project","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_in_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear the Java versions symlinked in the current project — java_clear_in_project","text":"","code":"java_clear_in_project(project_path = NULL, check = TRUE, delete_all = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_in_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear the Java versions symlinked in the current project — java_clear_in_project","text":"project_path project directory clear. Defaults current working directory. check Whether list symlinked Java versions clearing . Defaults TRUE. delete_all Whether delete symlinks without prompting. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_in_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clear the Java versions symlinked in the current project — java_clear_in_project","text":"message indicating whether symlinks cleared .","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_installed_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear the Java installations cache folder — java_clear_installed_cache","title":"Clear the Java installations cache folder — java_clear_installed_cache","text":"Clear Java installations cache folder","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_installed_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear the Java installations cache folder — java_clear_installed_cache","text":"","code":"java_clear_installed_cache( check = TRUE, delete_all = FALSE, cache_path = getOption(\"rJavaEnv.cache_path\") )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_installed_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear the Java installations cache folder — java_clear_installed_cache","text":"check Whether list contents cache directory clearing . Defaults TRUE. delete_all Whether delete installations without prompting. Defaults FALSE. cache_path cache directory clear. Defaults user-specific data directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_installed_cache.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clear the Java installations cache folder — java_clear_installed_cache","text":"message indicating whether cache cleared .","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":null,"dir":"Reference","previous_headings":"","what":"Download a Java distribution — java_download","title":"Download a Java distribution — java_download","text":"Download Java distribution","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download a Java distribution — java_download","text":"","code":"java_download( version = 21, distribution = \"Corretto\", cache_path = getOption(\"rJavaEnv.cache_path\"), platform = platform_detect()$os, arch = platform_detect()$arch, quiet = FALSE, temp_dir = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download a Java distribution — java_download","text":"version Integer character vector length 1 major version Java download install. specified, defaults latest LTS version. Can \"8\", \"11\", \"17\", \"21\", \"22\", 8, 11, 17, 21, 22. distribution Java distribution download. specified, defaults \"Amazon Corretto\". Currently \"Amazon Corretto\" supported. cache_path destination directory download Java distribution . Defaults user-specific data directory. platform platform download Java distribution. Defaults current platform. arch architecture download Java distribution. Defaults current architecture. quiet logical value indicating whether suppress messages. Can TRUE FALSE. temp_dir logical. Whether file saved temporary directory. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download a Java distribution — java_download","text":"path downloaded Java distribution file.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download a Java distribution — java_download","text":"","code":"if (FALSE) { # \\dontrun{ # download distribution of Java version 17 java_download(version = \"17\", temp_dir = TRUE) # download default Java distribution (version 21) java_download(temp_dir = TRUE) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"Set JAVA_HOME PATH environment variables given path","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"","code":"java_env_set( where = c(\"session\", \"both\", \"project\"), java_home, project_path = NULL, quiet = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"set JAVA_HOME: \"session\", \"project\", \"\". Defaults \"session\" updates paths current R session. \"\" \"project\" selected, function updates .Rprofile file project directory set JAVA_HOME PATH environment variables start R session. java_home path desired JAVA_HOME. project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"Nothing. Sets JAVA_HOME PATH environment variables.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"","code":"if (FALSE) { # \\dontrun{ # download, install Java 17 java_17_distrib <- java_download(version = \"17\", temp_dir = TRUE) java_home <- java_install( java_distrib_path = java_17_distrib, project_path = tempdir(), autoset_java_env = FALSE ) # now manually set the JAVA_HOME and PATH environment variables in current session java_env_set( where = \"session\", java_home = java_home ) # or set JAVA_HOME and PATH in the spefific projects' .Rprofile java_env_set( where = \"session\", java_home = java_home, project_path = tempdir() ) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_rprofile.html","id":null,"dir":"Reference","previous_headings":"","what":"Update the .Rprofile file in the project directory — java_env_set_rprofile","title":"Update the .Rprofile file in the project directory — java_env_set_rprofile","text":"Update .Rprofile file project directory","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_rprofile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update the .Rprofile file in the project directory — java_env_set_rprofile","text":"","code":"java_env_set_rprofile(java_home, project_path = NULL)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_rprofile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update the .Rprofile file in the project directory — java_env_set_rprofile","text":"java_home path desired JAVA_HOME. project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_session.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the JAVA_HOME and PATH environment variables for the current session — java_env_set_session","title":"Set the JAVA_HOME and PATH environment variables for the current session — java_env_set_session","text":"Set JAVA_HOME PATH environment variables current session","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_session.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the JAVA_HOME and PATH environment variables for the current session — java_env_set_session","text":"","code":"java_env_set_session(java_home)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_session.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the JAVA_HOME and PATH environment variables for the current session — java_env_set_session","text":"java_home path desired JAVA_HOME.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":null,"dir":"Reference","previous_headings":"","what":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"Unset JAVA_HOME PATH environment variables project .Rprofile","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"","code":"java_env_unset(project_path = NULL, quiet = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"Nothing. Removes JAVA_HOME PATH environment variables settings project .Rprofile.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"","code":"if (FALSE) { # \\dontrun{ # clear the JAVA_HOME and PATH environment variables in the specified project .Rprofile java_env_unset(project_path = tempdir()) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":null,"dir":"Reference","previous_headings":"","what":"Install Java from a distribution file — java_install","title":"Install Java from a distribution file — java_install","text":"Unpack Java distribution file cache directory link installation project directory, optionally setting JAVA_HOME PATH environment variables Java version just installed.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install Java from a distribution file — java_install","text":"","code":"java_install( java_distrib_path, project_path = NULL, autoset_java_env = TRUE, quiet = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install Java from a distribution file — java_install","text":"java_distrib_path character vector length 1 containing path Java distribution file. project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory. autoset_java_env logical indicating whether set JAVA_HOME PATH environment variables installed Java directory. Defaults TRUE. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install Java from a distribution file — java_install","text":"path installed Java directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install Java from a distribution file — java_install","text":"","code":"if (FALSE) { # \\dontrun{ # set cache dir to temporary directory options(rJavaEnv.cache_path = tempdir()) # download, install and autoset environmnet variables for Java 17 java_17_distrib <- java_download(version = \"17\") java_install(java_distrib_path = java_17_distrib, project_path = tempdir()) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":null,"dir":"Reference","previous_headings":"","what":"List the contents of the Java versions installed or cached — java_list","title":"List the contents of the Java versions installed or cached — java_list","text":"function lists one following: project - list contents Java symlinked/copied current project directory specified target_dir distrib - list contents downloaded Java distributions cache default location specified target_dir installed - list contents Java installations cache (unpacked distributions) default location specified target_dir","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the contents of the Java versions installed or cached — java_list","text":"","code":"java_list( type = c(\"project\", \"installed\", \"distrib\"), output = c(\"data.frame\", \"vector\"), quiet = TRUE, target_dir = NULL )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the contents of the Java versions installed or cached — java_list","text":"type type cache list: \"distrib\", \"installed\", \"project\". Defaults \"project\". output format output: data.frame`` vector“. Defaults data.frame. quiet logical value indicating whether suppress messages. Can TRUE FALSE. target_dir cache directory list. Defaults user-specific data directory \"distrib\" \"installed\", current working directory \"project\".","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the contents of the Java versions installed or cached — java_list","text":"dataframe character vector contents specified cache project directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List the contents of the Java versions installed or cached — java_list","text":"","code":"if (FALSE) { # \\dontrun{ java_list(\"project\") java_list(\"installed\") java_list(\"distrib\") } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_distrib_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"List the contents of the Java distributions cache folder — java_list_distrib_cache","title":"List the contents of the Java distributions cache folder — java_list_distrib_cache","text":"List contents Java distributions cache folder","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_distrib_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the contents of the Java distributions cache folder — java_list_distrib_cache","text":"","code":"java_list_distrib_cache( cache_path = getOption(\"rJavaEnv.cache_path\"), output = c(\"data.frame\", \"vector\"), quiet = TRUE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_distrib_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the contents of the Java distributions cache folder — java_list_distrib_cache","text":"cache_path destination directory download Java distribution . Defaults user-specific data directory. output format output: \"data.frame\" \"vector\". Defaults \"data.frame\". quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_distrib_cache.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the contents of the Java distributions cache folder — java_list_distrib_cache","text":"character vector contents cache directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_in_project.html","id":null,"dir":"Reference","previous_headings":"","what":"List the Java versions symlinked in the current project — java_list_in_project","title":"List the Java versions symlinked in the current project — java_list_in_project","text":"List Java versions symlinked current project","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_in_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the Java versions symlinked in the current project — java_list_in_project","text":"","code":"java_list_in_project( project_path = NULL, output = c(\"data.frame\", \"vector\"), quiet = TRUE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_in_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the Java versions symlinked in the current project — java_list_in_project","text":"project_path project directory list. Defaults current working directory. output format output: \"data.frame\" \"vector\". Defaults \"data.frame\". quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_in_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the Java versions symlinked in the current project — java_list_in_project","text":"data frame character vector symlinked Java versions project directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_installed_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"List the contents of the Java installations cache folder — java_list_installed_cache","title":"List the contents of the Java installations cache folder — java_list_installed_cache","text":"List contents Java installations cache folder","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_installed_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the contents of the Java installations cache folder — java_list_installed_cache","text":"","code":"java_list_installed_cache( output = c(\"data.frame\", \"vector\"), quiet = TRUE, cache_path = getOption(\"rJavaEnv.cache_path\") )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_installed_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the contents of the Java installations cache folder — java_list_installed_cache","text":"output format output: \"data.frame\" \"vector\". Defaults \"data.frame\". quiet logical value indicating whether suppress messages. Can TRUE FALSE. cache_path cache directory list. Defaults user-specific data directory. recommended change.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_installed_cache.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the contents of the Java installations cache folder — java_list_installed_cache","text":"data frame character vector contents cache directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":null,"dir":"Reference","previous_headings":"","what":"Download and install and set Java in current working/project directory — java_quick_install","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"Download install set Java current working/project directory","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"","code":"java_quick_install( version = 21, distribution = \"Corretto\", project_path = NULL, platform = platform_detect()$os, arch = platform_detect()$arch, quiet = FALSE, temp_dir = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"version Integer character vector length 1 major version Java download install. specified, defaults latest LTS version. Can \"8\", \"11\", \"17\", \"21\", \"22\", 8, 11, 17, 21, 22. distribution Java distribution download. specified, defaults \"Amazon Corretto\". Currently \"Amazon Corretto\" supported. project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory. platform platform download Java distribution. Defaults current platform. arch architecture download Java distribution. Defaults current architecture. quiet logical value indicating whether suppress messages. Can TRUE FALSE. temp_dir logical. Whether file saved temporary directory. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"Message indicating Java installed set current working/project directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"","code":"if (FALSE) { # \\dontrun{ # quick download, unpack, install and set in current working directory default Java version (21) java_quick_install(17, temp_dir = TRUE) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":null,"dir":"Reference","previous_headings":"","what":"Unpack a Java distribution file into cache directory — java_unpack","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"Unpack Java distribution file cache directory return path unpacked Java directory Java binaries.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"","code":"java_unpack(java_distrib_path, quiet = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"java_distrib_path character vector length 1 containing path Java distribution file. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"character vector containing length 1 containing path unpacked Java directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"","code":"if (FALSE) { # \\dontrun{ # set cache dir to temporary directory options(rJavaEnv.cache_path = tempdir()) # download Java 17 distrib and unpack it into cache dir java_17_distrib <- java_download(version = \"17\") java_home <- java_unpack(java_distrib_path = java_17_distrib) # set the JAVA_HOME environment variable in the current session # to the cache dir without touching any files in the current project directory java_env_set(where = \"session\", java_home = java_home) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_urls_load.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Java URLs from JSON file — java_urls_load","title":"Load Java URLs from JSON file — java_urls_load","text":"Load Java URLs JSON file","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_urls_load.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Java URLs from JSON file — java_urls_load","text":"","code":"java_urls_load()"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_urls_load.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load Java URLs from JSON file — java_urls_load","text":"list Java URLs structured JSON file distribution, platform, architecture.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_version_check_rscript.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Java version using rJava — java_version_check_rscript","title":"Check Java version using rJava — java_version_check_rscript","text":"Check Java version using rJava","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_version_check_rscript.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Java version using rJava — java_version_check_rscript","text":"","code":"java_version_check_rscript(java_home)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_version_check_rscript.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Java version using rJava — java_version_check_rscript","text":"java_home","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_version_check_rscript.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Java version using rJava — java_version_check_rscript","text":"message Java version error message.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/platform_detect.html","id":null,"dir":"Reference","previous_headings":"","what":"Detect platform and architecture — platform_detect","title":"Detect platform and architecture — platform_detect","text":"Detect platform architecture","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/platform_detect.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detect platform and architecture — platform_detect","text":"","code":"platform_detect(quiet = TRUE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/platform_detect.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detect platform and architecture — platform_detect","text":"quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/platform_detect.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detect platform and architecture — platform_detect","text":"list length 2 detected platform architecture.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rJavaEnv-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rJavaEnv: 'Java' Environments for R Projects — rJavaEnv-package","title":"rJavaEnv: 'Java' Environments for R Projects — rJavaEnv-package","text":"Quickly install 'Java Development Kit (JDK)' without administrative priviliges set environment variables current R session project solve common issues 'Java' environment management 'R'. Recommended users 'Java'/'rJava'-dependent 'R' packages 'r5r', 'opentripplanner', 'xlsx', 'openNLP', 'rWeka', 'RJDBC', 'tabulapdf', many . `rJavaEnv` prevents common problems like 'Java' found, 'Java' version conflicts, missing 'Java' installations, inability install 'Java' due lack administrative privileges. 'rJavaEnv' automates download, installation, setup 'Java' per-project basis setting relevant 'JAVA_HOME' current 'R' session current working directory (via '.Rprofile', user's consent). Similar 'renv' 'R' packages, 'rJavaEnv' allows different 'Java' versions used across different projects, can also configured allow multiple versions within project (e.g. help 'targets' package). Note: extra steps 'Linux' users, 'Java' previously installed system, prefer package installation source, rather installing binaries 'Posit Package Manager'. See documentation details.","code":""},{"path":[]},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rJavaEnv-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rJavaEnv: 'Java' Environments for R Projects — rJavaEnv-package","text":"Maintainer: Egor Kotov kotov.egor@gmail.com (ORCID) [copyright holder] contributors: Mauricio Vargas mavargas11@uc.cl (ORCID) [contributor] Hadley Wickham hadley@posit.co (use_java feature suggestion PR review) [contributor]","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain User Consent for rJavaEnv — rje_consent","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"Get user consent rJavaEnv write update files file system. rJavaEnv needs permission manage files project cache directories function correctly.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"","code":"rje_consent(provided = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"provided Logical indicating consent already provided. provide consent non-interactive R sessions use rJavaEnv::rje_consent(provided = TRUE). Default FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"TRUE consent given, otherwise error raised.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"line CRAN policies, explicit user consent required making changes. Please call rJavaEnv::consent() provide consent. Alternatively, can set following R option (especially useful non-interactive R sessions): function based code renv package. Copyright 2023 Posit Software, PBC License: https://github.com/rstudio/renv/blob/main/LICENSE","code":"options(rJavaEnv.consent = TRUE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"","code":"if (FALSE) { # \\dontrun{ # to provide consent and prevent other functions from interrupting to get the consent rje_consent(provided = TRUE) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent_check.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify User Consent for rJavaEnv — rje_consent_check","title":"Verify User Consent for rJavaEnv — rje_consent_check","text":"Ensure user granted permission rJavaEnv manage files file system.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent_check.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify User Consent for rJavaEnv — rje_consent_check","text":"","code":"rje_consent_check()"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent_check.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify User Consent for rJavaEnv — rje_consent_check","text":"TRUE consent verified, otherwise error raised.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent_check.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Verify User Consent for rJavaEnv — rje_consent_check","text":"function based code renv package. Copyright 2023 Posit Software, PBC License: https://github.com/rstudio/renv/blob/main/LICENSE","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_envvar_exists.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper for clean env var check — rje_envvar_exists","title":"Helper for clean env var check — rje_envvar_exists","text":"#' function based code renv package. Copyright 2023 Posit Software, PBC License: https://github.com/rstudio/renv/blob/main/LICENSE","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_envvar_exists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper for clean env var check — rje_envvar_exists","text":"","code":"rje_envvar_exists(key)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_envvar_exists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper for clean env var check — rje_envvar_exists","text":"key environment variable key check.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/urls_test_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Test all Java URLs — urls_test_all","title":"Test all Java URLs — urls_test_all","text":"Test Java URLs","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/urls_test_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test all Java URLs — urls_test_all","text":"","code":"urls_test_all()"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/urls_test_all.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test all Java URLs — urls_test_all","text":"list results testing Java URLs.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":null,"dir":"Reference","previous_headings":"","what":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"Using specified Java version, set JAVA_HOME PATH environment variables current R session. Java distribtuion downloaded yet, download . installed cache directory yet, install set environment variables. intended quick easy way use different Java versions R scripts project, require different Java versions. example, one use scripts called targets package callr package.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"","code":"use_java( version = NULL, distribution = \"Corretto\", cache_path = getOption(\"rJavaEnv.cache_path\"), platform = platform_detect()$os, arch = platform_detect()$arch, quiet = TRUE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"version Integer character vector length 1 major version Java download install. specified, defaults latest LTS version. Can \"8\", \"11\", \"17\", \"21\", \"22\", 8, 11, 17, 21, 22. distribution Java distribution download. specified, defaults \"Amazon Corretto\". Currently \"Amazon Corretto\" supported. cache_path destination directory download Java distribution . Defaults user-specific data directory. platform platform download Java distribution. Defaults current platform. arch architecture download Java distribution. Defaults current architecture. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"NULL. Prints message Java set current R session quiet set FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"","code":"if (FALSE) { # \\dontrun{ # set cache directory for Java to be in temporary directory options(rJavaEnv.cache_path = tempdir()) # install and set Java 8 in current R session use_java(8) # check Java version \"8\" == java_check_version_cmd(quiet = TRUE) \"8\" == java_check_version_rjava(quiet = TRUE) # install and set Java 17 in current R session use_java(17) # check Java version \"17\" == java_check_version_cmd(quiet = TRUE) \"17\" == java_check_version_rjava(quiet = TRUE) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/news/index.html","id":"rjavaenv-020-2024-08-28","dir":"Changelog","previous_headings":"","what":"rJavaEnv 0.2.0 (2024-08-28)","title":"rJavaEnv 0.2.0 (2024-08-28)","text":"Breaking change: java_check_version_cmd() java_check_version_rjava() now return detected Java version instead TRUE/FALSE New function use_java() download, install set Java cache current sesssion, without touching current project/working directory. intended use targets callr. New vignette using package targets' 'callr Updated documentation clearer instructions cache folder cleanup removing package Depends R > 4.0 able write package cache directory without extra user warning. Cache cleanup management functions provided, well documentation README vignettes.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/news/index.html","id":"rjavaenv-012","dir":"Changelog","previous_headings":"","what":"rJavaEnv 0.1.2","title":"rJavaEnv 0.1.2","text":"CRAN release: 2024-08-26 Fixed broken links README.md","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/news/index.html","id":"rjavaenv-011","dir":"Changelog","previous_headings":"","what":"rJavaEnv 0.1.1","title":"rJavaEnv 0.1.1","text":"Improved documentation Better handling cache directory Bug fixes changes address CRAN reviewer’s comments first submission","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/news/index.html","id":"rjavaenv-010","dir":"Changelog","previous_headings":"","what":"rJavaEnv 0.1.0","title":"rJavaEnv 0.1.0","text":"Initial release","code":""}] +[{"path":[]},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement kotov.egor@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to rJavaEnv","title":"Contributing to rJavaEnv","text":"outlines propose change rJavaEnv. detailed discussion contributing tidyverse packages, please see development contributing guide code review principles.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to rJavaEnv","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to rJavaEnv","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees ’s needed. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed). See guide create great issue advice.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to rJavaEnv","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"e-kotov/rJavaEnv\", fork = TRUE). Install development dependencies devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. user-facing changes, add bullet top NEWS.md (.e. just first header). Follow style described https://style.tidyverse.org/news.html.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to rJavaEnv","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to rJavaEnv","text":"Please note rJavaEnv project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 rJavaEnv authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/multiple-java-with-targets-callr.html","id":"how-to-use-use_java","dir":"Articles","previous_headings":"","what":"How to use use_java()","title":"Multiple Java environments in one project with targets and callr","text":"Let’s illustrate simple example. First, load package check valid major versions Java: Now select two three versions run use_java(), checking every time correct java set current environment. probably wait bit Java distribution downloaded unpacked. However, now repeat commands, see correct Java version set instantly, downloading unpacking skipped.","code":"library(rJavaEnv) getOption(\"rJavaEnv.valid_major_java_versions\") [1] \"8\" \"11\" \"17\" \"21\" \"22\" use_java(\"8\") \"8\" == java_check_version_cmd(quiet = TRUE) \"8\" == java_check_version_rjava(quiet = TRUE) [1] TRUE [1] TRUE use_java(17) \"17\" == java_check_version_cmd(quiet = TRUE) \"17\" == java_check_version_rjava(quiet = TRUE) [1] TRUE [1] TRUE use_java(21) \"21\" == java_check_version_cmd(quiet = TRUE) \"21\" == java_check_version_rjava(quiet = TRUE) [1] TRUE [1] TRUE"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/multiple-java-with-targets-callr.html","id":"how-to-use-with-targets-and-callr","dir":"Articles","previous_headings":"","what":"How to use with targets and callr","title":"Multiple Java environments in one project with targets and callr","text":"{targets} {callr} packages allow user run R scripts clean separate R sessions. essentially allows user run multiple versions Java one project targets callr, mostly overcoming issue manually switching Java versions one project. One simple thing can one scripts needs Java 8, another one needs Java 17, insert use_java() beginning scripts run targets callr like : : first run script go process downloading unpacking Java distribution. second run need download unpacking instant. need runs instant first attempt, can predownload pre-install Java cache folders using:","code":"library(rJavaEnv) use_java(\"17\") rJavaEnv::use_java(\"17\") java_17_distrib <- java_download(\"17\") java_unpack(java_17_distrib)"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"set-up-cache-folder-location","dir":"Articles","previous_headings":"","what":"1. Set-up cache folder location","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"can specify cache folder location rJavaEnv.cache_path option. default location set whichever path returned tools::R_user_dir(\"rJavaEnv\", = \"cache\"). exact path depend operating system. recommendation leave option ’s default setting. similar renv package manages cache R packages. can view current cache location : Expected output (Windows machine): Expected output (macOS machine):","code":"options(rJavaEnv.cache_path = \"/path/to/your/desired/cache/folder\") getOption(\"rJavaEnv.cache_path\") \"C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv\" \"/Users/user_name/Library/Caches/org.R-project.R/R/rJavaEnv\""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"download-java-jdk-distributions","dir":"Articles","previous_headings":"","what":"2. Download Java JDK distributions","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"download specific Java distribution, use java_download function: Expected output (Windows machine): function download specified version Java JDK (currently defaults supported Corretto distribution Amazon, added new package releases). function returns path downloaded distribution file, just zip gz archive. default, cache_path specified calling java_download(), distribution downloaded folder defined getOption(\"rJavaEnv.cache_path\"). argument can override globally set cache folder location single download. java_download() also allows define operating system processor architecture function arguments platform arch (please see function documentation using ?rJavaEnv::java_download). example, may useful packaging Java distribution Linux using Windows macOS machine. may also useful reason automatic OS CPU detection fails. example, line download Amazon Corretto Java JDK version 8 x86-64 Linux, even though may running code aarch64 macOS x86_64 Windows machine: Example expected output (Windows machine):","code":"java_17_distr <- java_download(version = 17) java_17_distr Detected platform: windows Detected architecture: x64 You can change the platform and architecture by specifying the `platform` and `arch` arguments. Downloading Java 17 (Corretto) for windows x64 to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-17-x64-windows-jdk.zip [100%] Downloaded 187323560 bytes... Download completed. MD5 checksum verified. [1] \"C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-17-x64-windows-jdk.zip\" java_8_linux64_distr <- java_download( version = 8, platform = \"linux\", arch = \"x64\" ) Detected platform: linux Detected architecture: x64 You can change the platform and architecture by specifying the `platform` and `arch` arguments. Downloading Java 8 (Corretto) for linux x64 to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-8-x64-linux-jdk.tar.gz [100%] Downloaded 118096667 bytes... Download completed. MD5 checksum verified."},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"manage-downloaded-java-jdk-distributions","dir":"Articles","previous_headings":"","what":"3. Manage downloaded Java JDK distributions","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"can manage downloaded distributions java_list java_clear functions. Expected output (Windows machine): Example expected output (Windows machine): can also delete downloaded distributions without consent : Example expected output:","code":"java_list(\"distrib\") java_distr_path 1 C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-17-x64-windows-jdk.zip 2 C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-21-x64-windows-jdk.zip 3 C:\\\\Users\\\\user_name\\\\AppData\\\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-8-x64-linux-jdk.tar.gz java_clear(\"distrib\") i Existing Java distributions: 1: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-17-x64-windows-jdk.zip 2: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-21-x64-windows-jdk.zip 3: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-8-x64-linux-jdk.tar.gz i Enter the number of the distribution to delete, 'all' to delete all, or '0' or any other character to cancel: java_clear(\"distrib\", delete_all = TRUE) Java distributions cache cleared."},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"install-from-downloaded-java-jdk-distributions-into-current-project","dir":"Articles","previous_headings":"","what":"4. Install from downloaded Java JDK distributions into current project","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"cleared downloaded Java distributions, let us re-download : Now downloaded Java distributions, can install one project. Installation context rJavaEnv means extracting distribution installed cache folder (root cache directory zip archives distributions), linking files (via symlinks macOS Linux, junctions Windows1). set autoset_java_env argument FALSE need set JAVA_HOME PATH environment variables manually. Example expected output (Windows machine): leave autoset_java_env = TRUE default option, install_java() function automatically set JAVA_HOME PATH environment variables manually current R session current project/working directory writing lines .Rprofile file current working directory. way time start R session, JAVA_HOME PATH environment variables set correct path installed Java distribution. Alternatively, may want install Java project, just unpack distribution cache folder. , can use java_unpack() function, passing path downloaded Java distribution : java_unpack return full path unpacked Java distribution can use set environment variables section using java_env_set().","code":"java_8_distr <- java_download(8) java_17_distr <- java_download(17) java_22_distr <- java_download(22) java_install( java_distrib_path = java_17_distr, autoset_java_env = FALSE) Java 17 (amazon-corretto-17-x64-windows-jdk.zip) for windows x64 installed at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/17 and symlinked to C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 java_home <- java_unpack(java_distr_path = java_8_distr)"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"manually-set-installed-java-environment","dir":"Articles","previous_headings":"","what":"5. Manually set installed Java environment","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"Let us install another downloaded Java distribution, time autoset_java_env = TRUE: Expected output (Windows machine): can now list Java versions installed project directory: Expected output (Windows machine): first installed Java 17 autoset_java_env = FALSE, installed Java 8 autoset_java_env = TRUE. check version currently set JAVA_HOME environment variable, get second installed Java version, Java 8. Expected output (Windows machine): switch Java 17 need manually set JAVA_HOME PATH environment variables java_env_set(). identify path pass java_env_set(), can use java_list(\"project\") function : Expected output (Windows machine): can see, Java 17 currently number 1 list, save path: Expected output (Windows machine): Now can reuse path java_env_set() function: Expected output (Windows machine): finally can double check version Java going picked Java/rJava-dependent R package going use : Expected output (Windows machine):","code":"java_install( java_distrib_path = java_8_distr, autoset_java_env = TRUE) Java distribution amazon-corretto-8-x64-windows-jdk.zip already unpacked at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8 v Current R Session: JAVA_HOME and PATH set to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8 v Current R Project/Working Directory: JAVA_HOME and PATH set to 'C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8' in .Rprofile at 'C:/Users/user_name/AppData/Local/Temp/75/R tmp0MasTW' Java 8 (amazon-corretto-8-x64-windows-jdk.zip) for windows x64 installed at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8 and symlinked to C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/8 java_list(\"project\") path platform arch version 1 C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 windows x64 17 2 C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/8 windows x64 8 java_check_version_cmd() JAVA_HOME: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/8 Java path: /c/Users/user_name/AppData/Local/R/cache/R/rJavaEnv/installed/windows/x64/8/bin/java Java version: \"openjdk version \\\"1.8.0_422\\\" OpenJDK Runtime Environment Corretto-8.422.05.1 (build 1.8.0_422-b05) OpenJDK 64-Bit Server VM Corretto-8.422.05.1 (build 25.422-b05, mixed mode)\" [1] TRUE java_list(\"project\") path platform arch version 1 C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 windows x64 17 2 C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/8 windows x64 8 java_home_17 <- java_list(\"project\", output = \"vector\")[1] java_home_17 \"C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17\" java_env_set(where = \"both\", java_home = java_home_17) v Current R Session: JAVA_HOME and PATH set to C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 v Current R Project/Working Directory: JAVA_HOME and PATH set to 'C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17' in .Rprofile at 'C:/Users/user_name/AppData/Local/Temp/75/R tmp0MasTW' java_check_version_cmd() # for pacakges that use Java via commandline, like opentripplanner java_check_version_rjava() # for packages that use Java via `rJava`, like r5r JAVA_HOME: C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 Java path: /c/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17/bin/java Java version: \"openjdk version \\\"17.0.12\\\" 2024-07-16 LTS OpenJDK Runtime Environment Corretto-17.0.12.7.1 (build 17.0.12+7-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.12.7.1 (build 17.0.12+7-LTS, mixed mode, sharing)\" [1] TRUE Using current session's JAVA_HOME: C:/Users/user_name/AppData/Local/Temp/75/Rtmp0MasTW/rjavaenv/windows/x64/17 With the user-specified JAVA_HOME rJava and other rJava/Java-based packages will use Java version: \"17.0.12\" [1] TRUE"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv-step-by-step.html","id":"cleanup","dir":"Articles","previous_headings":"","what":"6. Cleanup","title":"Step-by-step: Download, Install, and Setup Java for ‘R’ Projects","text":"want use rJavaEnv anymore, please clear cache folders removing package: Also, clear .Rprofile file projects used package:","code":"java_clear(\"project\", delete_all = TRUE) java_clear(\"installed\", delete_all = TRUE) java_clear(\"distrib\", delete_all = TRUE) java_env_unset()"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"quickly-download-and-install-java","dir":"Articles","previous_headings":"","what":"1. Quickly Download and Install Java","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Install rJavaEnv CRAN: install latest version rJavaEnv R universe: Assume project directory currently temporary directory. Feel free skip , already working desired project directory like install Java. example outputs see paths point temporary directory, real project see project directory instead. first time run function requires writing home space, provided prompt warning package may write package cache folder home directory, current project directory, well .Rprofile file project directory (directory specify). quickly install Java JDK 21 (also default, specified) current project directory set environment: first run, asked consent change environment variables .Rprofile file current working/project directory. happens . command : Downloads Java distribution compatible OS architecture. Installs Java cache directory. Sets JAVA_HOME PATH environment variables current session project/working directory, Java/rJava dependent R package can use requested Java version. Example expected output (Windows machine): . can now use Java/rJava-dependent R package.","code":"install.packages(\"rJavaEnv\") install.packages('rJavaEnv', repos = c('https://e-kotov.r-universe.dev', 'https://cloud.r-project.org') ) project_dir <- tempdir() setwd(project_dir) library(rJavaEnv) java_quick_install(version = 21) Consent has been granted and recorded. Detected platform: windows Detected architecture: x64 You can change the platform and architecture by specifying the `platform` and `arch` arguments. Downloading Java 21 (Corretto) for windows x64 to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-21-x64-windows-jdk.zip [100%] Downloaded 201696048 bytes... Download completed. MD5 checksum verified. v Current R Session: JAVA_HOME and PATH set to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 v Current R Project/Working Directory: JAVA_HOME and PATH set to 'C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21' in .Rprofile at 'C:/Users/user_name/AppData/Local/Temp/75/ RtmpuoG3xJ' Java 21 (amazon-corretto-21-x64-windows-jdk.zip) for windows x64 installed at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 and symlinked to C:/Users/user_name/AppData/Local/Temp/75/RtmpuoG3xJ/rjavaenv/windows/x64/21"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"install-rjavaenv","dir":"Articles","previous_headings":"","what":"Install rJavaEnv","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Install rJavaEnv CRAN: install latest version rJavaEnv R universe:","code":"install.packages(\"rJavaEnv\") install.packages('rJavaEnv', repos = c('https://e-kotov.r-universe.dev', 'https://cloud.r-project.org') )"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"quick-install-java-jdk","dir":"Articles","previous_headings":"","what":"Quick Install Java JDK","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Assume project directory currently temporary directory. Feel free skip , already working desired project directory like install Java. example outputs see paths point temporary directory, real project see project directory instead. first time run function requires writing home space, provided prompt warning package may write package cache folder home directory, current project directory, well .Rprofile file project directory (directory specify). quickly install Java JDK 21 (also default, specified) current project directory set environment: first run, asked consent change environment variables .Rprofile file current working/project directory. happens . command : Downloads Java distribution compatible OS architecture. Installs Java cache directory. Sets JAVA_HOME PATH environment variables current session project/working directory, Java/rJava dependent R package can use requested Java version. Example expected output (Windows machine): . can now use Java/rJava-dependent R package.","code":"project_dir <- tempdir() setwd(project_dir) library(rJavaEnv) java_quick_install(version = 21) Consent has been granted and recorded. Detected platform: windows Detected architecture: x64 You can change the platform and architecture by specifying the `platform` and `arch` arguments. Downloading Java 21 (Corretto) for windows x64 to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/distrib/amazon-corretto-21-x64-windows-jdk.zip [100%] Downloaded 201696048 bytes... Download completed. MD5 checksum verified. v Current R Session: JAVA_HOME and PATH set to C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 v Current R Project/Working Directory: JAVA_HOME and PATH set to 'C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21' in .Rprofile at 'C:/Users/user_name/AppData/Local/Temp/75/ RtmpuoG3xJ' Java 21 (amazon-corretto-21-x64-windows-jdk.zip) for windows x64 installed at C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 and symlinked to C:/Users/user_name/AppData/Local/Temp/75/RtmpuoG3xJ/rjavaenv/windows/x64/21"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"check-java-installation","dir":"Articles","previous_headings":"","what":"2. Check Java installation","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"can check newly installed Java correctly picked Java/rJava-dependent R package going use . R packages use Java via rJava-dependency (e.g. r5r), can use following command: Example expected output (Windows machine): R packages use Java command line (e.g. opentripplanner), can use following command: Example expected output (Windows machine): Note: Linux system Java version previoulsy installed using pre-build R package binaries (example ‘Posit Package Manager’) instead install R packages source, step may quit R, follow steps set configure Java R, install rJava, otherwise rJava built source.*","code":"java_check_version_rjava() Using current session's JAVA_HOME: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 With the user-specified JAVA_HOME rJava and other rJava/Java-based packages will use Java version: \"21.0.4\" [1] TRUE java_check_version_cmd() java_check_version_cmd() JAVA_HOME: C:\\Users\\user_name\\AppData\\Local/R/cache/R/rJavaEnv/installed/windows/x64/21 Java path: /c/Users/user_name/AppData/Local/R/cache/R/rJavaEnv/installed/windows/x64/21/bin/java Java version: \"openjdk version \\\"21.0.4\\\" 2024-07-16 LTS OpenJDK Runtime Environment Corretto-21.0.4.7.1 (build 21.0.4+7-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.4.7.1 (build 21.0.4+7-LTS, mixed mode, sharing)\" [1] TRUE"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"note-linux","dir":"Articles","previous_headings":"","what":"Note for Linux users","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Note: Linux system Java version previoulsy installed using pre-build R package binaries (example ‘Posit Package Manager’) instead install R packages source, step may quit R, follow steps set configure Java R, install rJava, otherwise rJava built source.*","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"return-things-to-their-original-state","dir":"Articles","previous_headings":"","what":"3. Return things to their original state","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Run following code unset Java current working directory: Example expected output (Windows machine): line clears Java installations project directory: Example expected output: Now restart current R session R picks system Java (Java, installed system).","code":"java_env_unset() Removed JAVA_HOME settings from .Rprofile in 'C:/Users/user_name/AppData/Local/Temp/75/RtmpuoG3xJ/.Rprofile' java_clear(\"project\", delete_all = TRUE) All Java symlinks in the project have been cleared."},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"unset-java","dir":"Articles","previous_headings":"","what":"Unset Java","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"Run following code unset Java current working directory: Example expected output (Windows machine):","code":"java_env_unset() Removed JAVA_HOME settings from .Rprofile in 'C:/Users/user_name/AppData/Local/Temp/75/RtmpuoG3xJ/.Rprofile'"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"delete-java-from-the-project-directory","dir":"Articles","previous_headings":"","what":"Delete Java from the project directory","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"line clears Java installations project directory: Example expected output: Now restart current R session R picks system Java (Java, installed system).","code":"java_clear(\"project\", delete_all = TRUE) All Java symlinks in the project have been cleared."},{"path":"https://www.ekotov.pro/rJavaEnv/articles/rJavaEnv.html","id":"complete-cleanup","dir":"Articles","previous_headings":"","what":"4. Complete Cleanup","title":"Quick Start Guide: Java Setup for ‘R’ Projects","text":"want use rJavaEnv anymore, please clear cache folders removing package: Also, clear .Rprofile file projects used package: Now can remove package restart current R session R picks system Java (Java, installed system).","code":"java_clear(\"project\", delete_all = TRUE) java_clear(\"installed\", delete_all = TRUE) java_clear(\"distrib\", delete_all = TRUE) java_env_unset()"},{"path":"https://www.ekotov.pro/rJavaEnv/articles/why-rJavaEnv.html","id":"overall-popularity-of-java-dependent-r-packages","dir":"Articles","previous_headings":"","what":"Overall popularity of Java-dependent R packages","title":"Why rJavaEnv: the landscape of ‘Java’-dependent R packages","text":"popular widely known highly popular ggplot2 data.table packages, rJava-dependent packages (104 CRAN another 14 Bioconductor) (consequently, rJava ) widely used R community (see Figure 1). rJava (Urbanek 2024) downloaded 198,761 times May, 2024. total number downloads rJava-dependent packages 301,259 CRAN 5,368 Bioconductor. put context, ggplot2 downloaded 1,891,742 times data.table downloaded 846,726 times May, 2024. rJava-based packages collectively 6.3 times less popular ggplot2, noticeable number users. Figure 1: CRAN Downloads Time rJava rJava-dependent Packages, compared popular ggplot2 data.table context Note analysis covers packages available CRAN Bioconductor explicitly depend rJava package. packages use Java depend rJava package. example, {opentripplanner} package also relies underlying Java-based software calls command line. , however, also requires system environment variables set correctly. Identifying packages opentripplanner complicated, direct dependency rJava package. can assume many compared depend rJava.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/why-rJavaEnv.html","id":"individual-java-dependent-packages","dir":"Articles","previous_headings":"","what":"Individual Java-dependent packages","title":"Why rJavaEnv: the landscape of ‘Java’-dependent R packages","text":"zoom individual rJava-dependent packages, see Figure 2, downloads generated xlsx “companion” xlsxjars. Figure 2: CRAN Downloads Time rJava-dependent Packages remove xlsx (xlsxjars) outlier, see Figure 3), top packages : r5r “rapid realistic routing multimodal transport networks (walk, bike, public transport car)” (Pereira et al. 2021). package users experience multiple issues Java report GitHub, just examples include 1, 2, 3 many . RJDBC “[p]rovides Access Databases JDBC Interface” (Urbanek 2022). able find bug tracker package, simple web search reveals multiple issues one StackOverflow. mailR “send[ing] emails R” (Premraj 2021) (Java related issue GitHub). Web search also reveals StackOverflow discussions related Java version issues. RWeka, R interface Weka. Weka “collection machine learning algorithms data mining tasks written Java” (Hornik, Buchta, Zeileis 2009). StackOverflow discussions related Java version issues. Figure 3: CRAN Downloads Time top 20 rJava-dependent Packages packages: openNLP. “OpenNLP library machine learning based toolkit processing natural language text written Java” (Hornik 2019). also Java related issues discussed StackOverflow. xlsx. “R package interact Excel files using Apache POI [J]ava library” (Dragulescu Arendt 2020). Also many discussions StackOverflow GitHub. summarize, regardless Java-dependent R package used, users consistently encounter issues correct Java runtime installed system. Additionally, may using various R packages depend different Java versions, complicating management Java environment variables. task particularly challenging ordinary users simply want get analysis running smoothly efficiently.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/articles/why-rJavaEnv.html","id":"rjavaenv-r-package-as-a-solution","dir":"Articles","previous_headings":"","what":"rJavaEnv R package as a solution","title":"Why rJavaEnv: the landscape of ‘Java’-dependent R packages","text":"rJavaEnv aims assist users Java/rJava-dependent packages providing functions quickly install required Java version set environment variables. ensures packages user plans use pick correct Java version minimal intervention user’s system. Compared manually downloading Java Oracle, Amazon, another vendor installing using installer, rJavaEnv downloads non-installer archives Java, extracts cache folder, links current project working directory. way, rJavaEnv contaminate user’s machine unnecessary installations configurations. Furthermore, rJavaEnv streamlines process, allowing users focus analysis without worrying complex Java setup issues. automating tasks, rJavaEnv reduces potential errors ensures smoother experience users need manage multiple Java-dependent R packages.","code":""},{"path":[]},{"path":"https://www.ekotov.pro/rJavaEnv/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Egor Kotov. Author, maintainer, copyright holder. Mauricio Vargas. Contributor. Hadley Wickham. Contributor. use_java feature suggestion PR review","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kotov E (2024). rJavaEnv: Java Environments R Projects. doi:10.32614/CRAN.package.rJavaEnv, https://github.com/e-kotov/rJavaEnv.","code":"@Manual{rjavaenv, title = {rJavaEnv: Java Environments for R Projects}, author = {Egor Kotov}, year = {2024}, url = {https://github.com/e-kotov/rJavaEnv}, doi = {10.32614/CRAN.package.rJavaEnv}, }"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"rjavaenv-java-environments-for-r-projects-","dir":"","previous_headings":"","what":"rJavaEnv: `Java` Environments for R Projects","title":"rJavaEnv: `Java` Environments for R Projects","text":"Quickly install Java Development Kit (JDK) without administrative privileges set environment variables current R session project solve common issues ‘Java’ environment management ‘R’. Recommended users Java/rJava-dependent R packages r5r, opentripplanner, xlsx, {openNLP}, {rWeka}, RJDBC, tabulapdf, many . rJavaEnv prevents common problems like Java found, Java version conflicts, missing Java installations, inability install Java due lack administrative privileges. rJavaEnv automates download, installation, setup Java per-project basis setting relevant JAVA_HOME current R session current working directory (via .Rprofile, user’s consent). Similar renv R packages, rJavaEnv allows different Java versions used across different projects, can also configured allow multiple versions within project (e.g. help targets package). Note: extra steps ‘Linux’ users, don’t ‘Java’ previously installed system, prefer package installation source, rather installing binaries ‘Posit Package Manager’. See documentation details.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"install","dir":"","previous_headings":"","what":"Install","title":"rJavaEnv: `Java` Environments for R Projects","text":"Install CRAN: Install latest release R-multiverse: can also install development version rJavaEnv GitHub:","code":"install.packages('rJavaEnv') install.packages('rJavaEnv', repos = c('https://community.r-multiverse.org', 'https://cloud.r-project.org') ) if (!requireNamespace(\"remotes\", quietly = TRUE)) { install.packages(\"remotes\") } remotes::install_github(\"e-kotov/rJavaEnv\", force = TRUE)"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"simple-example","dir":"","previous_headings":"","what":"Simple Example","title":"rJavaEnv: `Java` Environments for R Projects","text":": download Java 21 distribution compatible current operating system processor architecture local cache folder; extract downloaded Java distribution another cache folder; create symbolic link (macOS Linux) junction (Windows, fails, just copies files) rjavaenv/platform/processor_architecture/java_version current directory/project point cached installation; set current session’s JAVA_HOME PATH environment variables point installed (symlinked) Java distribution; add code .Rprofile file current directory/project set JAVA_HOME PATH environment variables project opened RStudio. part normal operation, rJavaEnv update JAVA_HOME PATH environment variables current R session, local cache R package library, .Rprofile file project/current working directory. line CRAN policies, explicit user consent required making changes. Therefore, first time run function rJavaEnv makes changes, asked consent. explicitly consent /prevent interruptions non-interactive mode, can use rje_consent() function:","code":"rJavaEnv::java_quick_install(version = 21) rje_consent(provided = TRUE)"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"using-rjavaenv-with-targets-and-callr","dir":"","previous_headings":"","what":"Using rJavaEnv with targets and callr","title":"rJavaEnv: `Java` Environments for R Projects","text":"Just insert line begining script run targets callr: acts exactly like java_quick_install(), sets environment variables current session copy link Java binaries project directory. details vignette Multiple Java environments one project targets callr.","code":"rJavaEnv::use_java(\"21\")"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"cleanup","dir":"","previous_headings":"","what":"Cleanup","title":"rJavaEnv: `Java` Environments for R Projects","text":"want use rJavaEnv anymore, please clear cache folders removing package: Also, clear .Rprofile file projects used package:","code":"java_clear(\"project\", delete_all = TRUE) java_clear(\"installed\", delete_all = TRUE) java_clear(\"distrib\", delete_all = TRUE) java_env_unset()"},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"functions-overview","dir":"","previous_headings":"","what":"Functions Overview","title":"rJavaEnv: `Java` Environments for R Projects","text":"package several core functions: Downloads, installs, sets Java environment current working/project directory, one line code. Checks installed Java version using terminal commands. packages like opentripplanner, performs Java calls using command line. Checks installed Java version using rJava separate R session. rJava-dependent packages r5r. Downloads specified version distribution Java. Installs Java distribution file current (user-specified) project directory. Sets JAVA_HOME PATH environment variables given path current R session /.Rprofile file project directory. Remove JAVA_HOME PATH environment variables .Rrpofile file project directory (current R session, please restart session R picks system Java). Lists Java versions linked current project (cached distributions installations). Removes Java versions linked current project (cached distributions installations). use_java() java_quick_install(), less intrusive way. copy link Java installation folder cache project directory create edit .Rprofile file. sets requested java current R session. See details functions Reference. detailed usage, see Quick Start Vignette (work progress).","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"limitations","dir":"","previous_headings":"","what":"Limitations","title":"rJavaEnv: `Java` Environments for R Projects","text":"Currently, rJavaEnv supports major Java versions 8, 11, 17, 21, 22. download install functions ignore minor version Java distribution just downloads latest stable subversion specified major version. done simplify process avoid need update package every time new minor version Java released. users sufficient, substandard full reproducibility. main limitation want switch another Java environment, likely restart current R session set JAVA_HOME PATH environment variables desired Java environment using rJavaEnv::java_env_set(). done dynamically within R session due way Java initialized R, particularly rJava-dependent packages r5r. packages like opentripplanner, performs Java calls using command line, can switch Java environments dynamically within R session much want. Therefore, need use R packages depend different Java versions within project, create separate R scripts Java environment run separate R sessions. One effective way use callr package run R scripts separate R sessions. Another option use targets package manage whole project workflow, , side effect, lead R scripts run separate R sessions. use rJavaEnv targets, need download install several Java environments using rJavaEnv::java_download() rJavaEnv::java_install() set relevant path rJavaEnv::java_env_set() beginning function requires certain Java version.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"future-work","dir":"","previous_headings":"","what":"Future work","title":"rJavaEnv: `Java` Environments for R Projects","text":"future work includes: Add support Java distributions versions Take care R CMD javareconf Possibly add support specifying Java version beyond major version Possibly allow downloading several Java distributions one function call, e.g. different major versions ‘flavour’ different ‘flavours’ major version Possibly add automation get Java required specific Java-dependent R packages open suggestions contributions, welcome issues pull requests.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"rJavaEnv: `Java` Environments for R Projects","text":"thank rOpenSci Dev Guide, well Hadley Wickham Jennifer Bryan R Packages book. Package hex sticker logo partially generated DALL-E OpenAI. logo also contains original R logo.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"rJavaEnv: `Java` Environments for R Projects","text":"cite package ‘rJavaEnv’ publications use: Kotov E (2024). rJavaEnv: Java Environments R Projects. doi:10.32614/CRAN.package.rJavaEnv https://doi.org/10.32614/CRAN.package.rJavaEnv, https://github.com/e-kotov/rJavaEnv. BibTeX:","code":"@Manual{rjavaenv, title = {rJavaEnv: Java Environments for R Projects}, author = {Egor Kotov}, year = {2024}, url = {https://github.com/e-kotov/rJavaEnv}, doi = {10.32614/CRAN.package.rJavaEnv}, }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/global_quiet_param.html","id":null,"dir":"Reference","previous_headings":"","what":"Global Quiet Parameter — global_quiet_param","title":"Global Quiet Parameter — global_quiet_param","text":"Documentation quiet parameter, used globally.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/global_quiet_param.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Global Quiet Parameter — global_quiet_param","text":"","code":"global_quiet_param(quiet)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/global_quiet_param.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Global Quiet Parameter — global_quiet_param","text":"quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":null,"dir":"Reference","previous_headings":"","what":"Check installed Java version using terminal commands — java_check_version_cmd","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"Check installed Java version using terminal commands","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"","code":"java_check_version_cmd(java_home = NULL, quiet = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"java_home Path Java home directory. NULL, function uses JAVA_HOME environment variable. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"character vector length 1 containing major Java version.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_cmd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check installed Java version using terminal commands — java_check_version_cmd","text":"","code":"java_check_version_cmd() #> JAVA_HOME: /usr/lib/jvm/temurin-11-jdk-amd64 #> Java path: /usr/bin/java #> Java version: \"openjdk version \\\"11.0.24\\\" 2024-07-16 OpenJDK Runtime #> Environment Temurin-11.0.24+8 (build 11.0.24+8) OpenJDK 64-Bit Server VM #> Temurin-11.0.24+8 (build 11.0.24+8, mixed mode)\" #> [1] \"11\""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"function sets JAVA_HOME environment variable, initializes JVM using rJava, prints Java version used user sets given JAVA_HOME current R session. check performed separate R session avoid reload current R session. reason Java initialized R session, uninitialized unless current R session restarted.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"","code":"java_check_version_rjava(java_home = NULL, quiet = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"java_home Path Java home directory. NULL, function uses JAVA_HOME environment variable. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"character vector length 1 containing major Java version.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_rjava.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check Java Version with a Specified JAVA_HOME Using a Separate R Session — java_check_version_rjava","text":"","code":"if (FALSE) { # \\dontrun{ java_check_version_rjava() } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_system.html","id":null,"dir":"Reference","previous_headings":"","what":"Check and print Java path and version using system commands — java_check_version_system","title":"Check and print Java path and version using system commands — java_check_version_system","text":"function checks Java executable path retrieves Java version, prints details console.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_system.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check and print Java path and version using system commands — java_check_version_system","text":"","code":"java_check_version_system(quiet)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_system.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check and print Java path and version using system commands — java_check_version_system","text":"quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_check_version_system.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check and print Java path and version using system commands — java_check_version_system","text":"character vector length 1 containing major Java version.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage Java installations and distributions caches — java_clear","title":"Manage Java installations and distributions caches — java_clear","text":"Wrapper function clear Java symlinked current project, installed, distributions caches.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage Java installations and distributions caches — java_clear","text":"","code":"java_clear( type = c(\"project\", \"installed\", \"distrib\"), target_dir = NULL, check = TRUE, delete_all = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage Java installations and distributions caches — java_clear","text":"type clear: \"project\" - remove symlinks install cache current project, \"installed\" - remove installed Java versions, \"distrib\" - remove downloaded Java distributions. target_dir directory clear. Defaults current working directory \"project\" user-specific data directory \"installed\" \"distrib\". recommended change. check Whether list contents cache directory clearing . Defaults TRUE. delete_all Whether delete items without prompting. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Manage Java installations and distributions caches — java_clear","text":"message indicating whether cache cleared .","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage Java installations and distributions caches — java_clear","text":"","code":"if (FALSE) { # \\dontrun{ java_clear(\"project\", target_dir = tempdir()) java_clear(\"installed\", target_dir = tempdir()) java_clear(\"distrib\", target_dir = tempdir()) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_distrib_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear the Java distributions cache folder — java_clear_distrib_cache","title":"Clear the Java distributions cache folder — java_clear_distrib_cache","text":"Clear Java distributions cache folder","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_distrib_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear the Java distributions cache folder — java_clear_distrib_cache","text":"","code":"java_clear_distrib_cache( cache_path = getOption(\"rJavaEnv.cache_path\"), check = TRUE, delete_all = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_distrib_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear the Java distributions cache folder — java_clear_distrib_cache","text":"cache_path cache directory clear. Defaults user-specific data directory. check Whether list contents cache directory clearing . Defaults TRUE. delete_all Whether delete items without prompting. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_distrib_cache.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clear the Java distributions cache folder — java_clear_distrib_cache","text":"message indicating whether cache cleared .","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_in_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear the Java versions symlinked in the current project — java_clear_in_project","title":"Clear the Java versions symlinked in the current project — java_clear_in_project","text":"Clear Java versions symlinked current project","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_in_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear the Java versions symlinked in the current project — java_clear_in_project","text":"","code":"java_clear_in_project(project_path = NULL, check = TRUE, delete_all = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_in_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear the Java versions symlinked in the current project — java_clear_in_project","text":"project_path project directory clear. Defaults current working directory. check Whether list symlinked Java versions clearing . Defaults TRUE. delete_all Whether delete symlinks without prompting. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_in_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clear the Java versions symlinked in the current project — java_clear_in_project","text":"message indicating whether symlinks cleared .","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_installed_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear the Java installations cache folder — java_clear_installed_cache","title":"Clear the Java installations cache folder — java_clear_installed_cache","text":"Clear Java installations cache folder","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_installed_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear the Java installations cache folder — java_clear_installed_cache","text":"","code":"java_clear_installed_cache( check = TRUE, delete_all = FALSE, cache_path = getOption(\"rJavaEnv.cache_path\") )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_installed_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear the Java installations cache folder — java_clear_installed_cache","text":"check Whether list contents cache directory clearing . Defaults TRUE. delete_all Whether delete installations without prompting. Defaults FALSE. cache_path cache directory clear. Defaults user-specific data directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_clear_installed_cache.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clear the Java installations cache folder — java_clear_installed_cache","text":"message indicating whether cache cleared .","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":null,"dir":"Reference","previous_headings":"","what":"Download a Java distribution — java_download","title":"Download a Java distribution — java_download","text":"Download Java distribution","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download a Java distribution — java_download","text":"","code":"java_download( version = 21, distribution = \"Corretto\", cache_path = getOption(\"rJavaEnv.cache_path\"), platform = platform_detect()$os, arch = platform_detect()$arch, quiet = FALSE, temp_dir = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download a Java distribution — java_download","text":"version Integer character vector length 1 major version Java download install. specified, defaults latest LTS version. Can \"8\", \"11\", \"17\", \"21\", \"22\", 8, 11, 17, 21, 22. distribution Java distribution download. specified, defaults \"Amazon Corretto\". Currently \"Amazon Corretto\" supported. cache_path destination directory download Java distribution . Defaults user-specific data directory. platform platform download Java distribution. Defaults current platform. arch architecture download Java distribution. Defaults current architecture. quiet logical value indicating whether suppress messages. Can TRUE FALSE. temp_dir logical. Whether file saved temporary directory. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download a Java distribution — java_download","text":"path downloaded Java distribution file.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_download.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download a Java distribution — java_download","text":"","code":"if (FALSE) { # \\dontrun{ # download distribution of Java version 17 java_download(version = \"17\", temp_dir = TRUE) # download default Java distribution (version 21) java_download(temp_dir = TRUE) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"Set JAVA_HOME PATH environment variables given path","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"","code":"java_env_set( where = c(\"session\", \"both\", \"project\"), java_home, project_path = NULL, quiet = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"set JAVA_HOME: \"session\", \"project\", \"\". Defaults \"session\" updates paths current R session. \"\" \"project\" selected, function updates .Rprofile file project directory set JAVA_HOME PATH environment variables start R session. java_home path desired JAVA_HOME. project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"Nothing. Sets JAVA_HOME PATH environment variables.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set the JAVA_HOME and PATH environment variables to a given path — java_env_set","text":"","code":"if (FALSE) { # \\dontrun{ # download, install Java 17 java_17_distrib <- java_download(version = \"17\", temp_dir = TRUE) java_home <- java_install( java_distrib_path = java_17_distrib, project_path = tempdir(), autoset_java_env = FALSE ) # now manually set the JAVA_HOME and PATH environment variables in current session java_env_set( where = \"session\", java_home = java_home ) # or set JAVA_HOME and PATH in the spefific projects' .Rprofile java_env_set( where = \"session\", java_home = java_home, project_path = tempdir() ) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_rprofile.html","id":null,"dir":"Reference","previous_headings":"","what":"Update the .Rprofile file in the project directory — java_env_set_rprofile","title":"Update the .Rprofile file in the project directory — java_env_set_rprofile","text":"Update .Rprofile file project directory","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_rprofile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update the .Rprofile file in the project directory — java_env_set_rprofile","text":"","code":"java_env_set_rprofile(java_home, project_path = NULL)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_rprofile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update the .Rprofile file in the project directory — java_env_set_rprofile","text":"java_home path desired JAVA_HOME. project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_session.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the JAVA_HOME and PATH environment variables for the current session — java_env_set_session","title":"Set the JAVA_HOME and PATH environment variables for the current session — java_env_set_session","text":"Set JAVA_HOME PATH environment variables current session","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_session.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the JAVA_HOME and PATH environment variables for the current session — java_env_set_session","text":"","code":"java_env_set_session(java_home)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_set_session.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the JAVA_HOME and PATH environment variables for the current session — java_env_set_session","text":"java_home path desired JAVA_HOME.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":null,"dir":"Reference","previous_headings":"","what":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"Unset JAVA_HOME PATH environment variables project .Rprofile","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"","code":"java_env_unset(project_path = NULL, quiet = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"Nothing. Removes JAVA_HOME PATH environment variables settings project .Rprofile.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_env_unset.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Unset the JAVA_HOME and PATH environment variables in the project .Rprofile — java_env_unset","text":"","code":"if (FALSE) { # \\dontrun{ # clear the JAVA_HOME and PATH environment variables in the specified project .Rprofile java_env_unset(project_path = tempdir()) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":null,"dir":"Reference","previous_headings":"","what":"Install Java from a distribution file — java_install","title":"Install Java from a distribution file — java_install","text":"Unpack Java distribution file cache directory link installation project directory, optionally setting JAVA_HOME PATH environment variables Java version just installed.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install Java from a distribution file — java_install","text":"","code":"java_install( java_distrib_path, project_path = NULL, autoset_java_env = TRUE, quiet = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install Java from a distribution file — java_install","text":"java_distrib_path character vector length 1 containing path Java distribution file. project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory. autoset_java_env logical indicating whether set JAVA_HOME PATH environment variables installed Java directory. Defaults TRUE. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install Java from a distribution file — java_install","text":"path installed Java directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_install.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install Java from a distribution file — java_install","text":"","code":"if (FALSE) { # \\dontrun{ # set cache dir to temporary directory options(rJavaEnv.cache_path = tempdir()) # download, install and autoset environmnet variables for Java 17 java_17_distrib <- java_download(version = \"17\") java_install(java_distrib_path = java_17_distrib, project_path = tempdir()) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":null,"dir":"Reference","previous_headings":"","what":"List the contents of the Java versions installed or cached — java_list","title":"List the contents of the Java versions installed or cached — java_list","text":"function lists one following: project - list contents Java symlinked/copied current project directory specified target_dir distrib - list contents downloaded Java distributions cache default location specified target_dir installed - list contents Java installations cache (unpacked distributions) default location specified target_dir","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the contents of the Java versions installed or cached — java_list","text":"","code":"java_list( type = c(\"project\", \"installed\", \"distrib\"), output = c(\"data.frame\", \"vector\"), quiet = TRUE, target_dir = NULL )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the contents of the Java versions installed or cached — java_list","text":"type type cache list: \"distrib\", \"installed\", \"project\". Defaults \"project\". output format output: data.frame`` vector“. Defaults data.frame. quiet logical value indicating whether suppress messages. Can TRUE FALSE. target_dir cache directory list. Defaults user-specific data directory \"distrib\" \"installed\", current working directory \"project\".","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the contents of the Java versions installed or cached — java_list","text":"dataframe character vector contents specified cache project directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List the contents of the Java versions installed or cached — java_list","text":"","code":"if (FALSE) { # \\dontrun{ java_list(\"project\") java_list(\"installed\") java_list(\"distrib\") } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_distrib_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"List the contents of the Java distributions cache folder — java_list_distrib_cache","title":"List the contents of the Java distributions cache folder — java_list_distrib_cache","text":"List contents Java distributions cache folder","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_distrib_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the contents of the Java distributions cache folder — java_list_distrib_cache","text":"","code":"java_list_distrib_cache( cache_path = getOption(\"rJavaEnv.cache_path\"), output = c(\"data.frame\", \"vector\"), quiet = TRUE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_distrib_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the contents of the Java distributions cache folder — java_list_distrib_cache","text":"cache_path destination directory download Java distribution . Defaults user-specific data directory. output format output: \"data.frame\" \"vector\". Defaults \"data.frame\". quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_distrib_cache.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the contents of the Java distributions cache folder — java_list_distrib_cache","text":"character vector contents cache directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_in_project.html","id":null,"dir":"Reference","previous_headings":"","what":"List the Java versions symlinked in the current project — java_list_in_project","title":"List the Java versions symlinked in the current project — java_list_in_project","text":"List Java versions symlinked current project","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_in_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the Java versions symlinked in the current project — java_list_in_project","text":"","code":"java_list_in_project( project_path = NULL, output = c(\"data.frame\", \"vector\"), quiet = TRUE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_in_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the Java versions symlinked in the current project — java_list_in_project","text":"project_path project directory list. Defaults current working directory. output format output: \"data.frame\" \"vector\". Defaults \"data.frame\". quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_in_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the Java versions symlinked in the current project — java_list_in_project","text":"data frame character vector symlinked Java versions project directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_installed_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"List the contents of the Java installations cache folder — java_list_installed_cache","title":"List the contents of the Java installations cache folder — java_list_installed_cache","text":"List contents Java installations cache folder","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_installed_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the contents of the Java installations cache folder — java_list_installed_cache","text":"","code":"java_list_installed_cache( output = c(\"data.frame\", \"vector\"), quiet = TRUE, cache_path = getOption(\"rJavaEnv.cache_path\") )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_installed_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List the contents of the Java installations cache folder — java_list_installed_cache","text":"output format output: \"data.frame\" \"vector\". Defaults \"data.frame\". quiet logical value indicating whether suppress messages. Can TRUE FALSE. cache_path cache directory list. Defaults user-specific data directory. recommended change.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_list_installed_cache.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List the contents of the Java installations cache folder — java_list_installed_cache","text":"data frame character vector contents cache directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":null,"dir":"Reference","previous_headings":"","what":"Download and install and set Java in current working/project directory — java_quick_install","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"Download install set Java current working/project directory","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"","code":"java_quick_install( version = 21, distribution = \"Corretto\", project_path = NULL, platform = platform_detect()$os, arch = platform_detect()$arch, quiet = FALSE, temp_dir = FALSE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"version Integer character vector length 1 major version Java download install. specified, defaults latest LTS version. Can \"8\", \"11\", \"17\", \"21\", \"22\", 8, 11, 17, 21, 22. distribution Java distribution download. specified, defaults \"Amazon Corretto\". Currently \"Amazon Corretto\" supported. project_path character vector length 1 containing project directory Java installed. specified NULL, defaults current working directory. platform platform download Java distribution. Defaults current platform. arch architecture download Java distribution. Defaults current architecture. quiet logical value indicating whether suppress messages. Can TRUE FALSE. temp_dir logical. Whether file saved temporary directory. Defaults FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"Message indicating Java installed set current working/project directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_quick_install.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download and install and set Java in current working/project directory — java_quick_install","text":"","code":"if (FALSE) { # \\dontrun{ # quick download, unpack, install and set in current working directory default Java version (21) java_quick_install(17, temp_dir = TRUE) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":null,"dir":"Reference","previous_headings":"","what":"Unpack a Java distribution file into cache directory — java_unpack","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"Unpack Java distribution file cache directory return path unpacked Java directory Java binaries.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"","code":"java_unpack(java_distrib_path, quiet = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"java_distrib_path character vector length 1 containing path Java distribution file. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"character vector containing length 1 containing path unpacked Java directory.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_unpack.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Unpack a Java distribution file into cache directory — java_unpack","text":"","code":"if (FALSE) { # \\dontrun{ # set cache dir to temporary directory options(rJavaEnv.cache_path = tempdir()) # download Java 17 distrib and unpack it into cache dir java_17_distrib <- java_download(version = \"17\") java_home <- java_unpack(java_distrib_path = java_17_distrib) # set the JAVA_HOME environment variable in the current session # to the cache dir without touching any files in the current project directory java_env_set(where = \"session\", java_home = java_home) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_urls_load.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Java URLs from JSON file — java_urls_load","title":"Load Java URLs from JSON file — java_urls_load","text":"Load Java URLs JSON file","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_urls_load.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Java URLs from JSON file — java_urls_load","text":"","code":"java_urls_load()"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_urls_load.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load Java URLs from JSON file — java_urls_load","text":"list Java URLs structured JSON file distribution, platform, architecture.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_version_check_rscript.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Java version using rJava — java_version_check_rscript","title":"Check Java version using rJava — java_version_check_rscript","text":"Check Java version using rJava","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_version_check_rscript.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Java version using rJava — java_version_check_rscript","text":"","code":"java_version_check_rscript(java_home)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_version_check_rscript.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Java version using rJava — java_version_check_rscript","text":"java_home","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/java_version_check_rscript.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Java version using rJava — java_version_check_rscript","text":"message Java version error message.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/platform_detect.html","id":null,"dir":"Reference","previous_headings":"","what":"Detect platform and architecture — platform_detect","title":"Detect platform and architecture — platform_detect","text":"Detect platform architecture","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/platform_detect.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detect platform and architecture — platform_detect","text":"","code":"platform_detect(quiet = TRUE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/platform_detect.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detect platform and architecture — platform_detect","text":"quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/platform_detect.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detect platform and architecture — platform_detect","text":"list length 2 detected platform architecture.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rJavaEnv-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rJavaEnv: 'Java' Environments for R Projects — rJavaEnv-package","title":"rJavaEnv: 'Java' Environments for R Projects — rJavaEnv-package","text":"Quickly install 'Java Development Kit (JDK)' without administrative priviliges set environment variables current R session project solve common issues 'Java' environment management 'R'. Recommended users 'Java'/'rJava'-dependent 'R' packages 'r5r', 'opentripplanner', 'xlsx', 'openNLP', 'rWeka', 'RJDBC', 'tabulapdf', many . `rJavaEnv` prevents common problems like 'Java' found, 'Java' version conflicts, missing 'Java' installations, inability install 'Java' due lack administrative privileges. 'rJavaEnv' automates download, installation, setup 'Java' per-project basis setting relevant 'JAVA_HOME' current 'R' session current working directory (via '.Rprofile', user's consent). Similar 'renv' 'R' packages, 'rJavaEnv' allows different 'Java' versions used across different projects, can also configured allow multiple versions within project (e.g. help 'targets' package). Note: extra steps 'Linux' users, 'Java' previously installed system, prefer package installation source, rather installing binaries 'Posit Package Manager'. See documentation details.","code":""},{"path":[]},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rJavaEnv-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rJavaEnv: 'Java' Environments for R Projects — rJavaEnv-package","text":"Maintainer: Egor Kotov kotov.egor@gmail.com (ORCID) [copyright holder] contributors: Mauricio Vargas mavargas11@uc.cl (ORCID) [contributor] Hadley Wickham hadley@posit.co (use_java feature suggestion PR review) [contributor]","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain User Consent for rJavaEnv — rje_consent","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"Get user consent rJavaEnv write update files file system. rJavaEnv needs permission manage files project cache directories function correctly.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"","code":"rje_consent(provided = FALSE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"provided Logical indicating consent already provided. provide consent non-interactive R sessions use rJavaEnv::rje_consent(provided = TRUE). Default FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"TRUE consent given, otherwise error raised.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"line CRAN policies, explicit user consent required making changes. Please call rJavaEnv::consent() provide consent. Alternatively, can set following R option (especially useful non-interactive R sessions): function based code renv package. Copyright 2023 Posit Software, PBC License: https://github.com/rstudio/renv/blob/main/LICENSE","code":"options(rJavaEnv.consent = TRUE)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Obtain User Consent for rJavaEnv — rje_consent","text":"","code":"if (FALSE) { # \\dontrun{ # to provide consent and prevent other functions from interrupting to get the consent rje_consent(provided = TRUE) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent_check.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify User Consent for rJavaEnv — rje_consent_check","title":"Verify User Consent for rJavaEnv — rje_consent_check","text":"Ensure user granted permission rJavaEnv manage files file system.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent_check.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify User Consent for rJavaEnv — rje_consent_check","text":"","code":"rje_consent_check()"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent_check.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify User Consent for rJavaEnv — rje_consent_check","text":"TRUE consent verified, otherwise error raised.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_consent_check.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Verify User Consent for rJavaEnv — rje_consent_check","text":"function based code renv package. Copyright 2023 Posit Software, PBC License: https://github.com/rstudio/renv/blob/main/LICENSE","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_envvar_exists.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper for clean env var check — rje_envvar_exists","title":"Helper for clean env var check — rje_envvar_exists","text":"#' function based code renv package. Copyright 2023 Posit Software, PBC License: https://github.com/rstudio/renv/blob/main/LICENSE","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_envvar_exists.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper for clean env var check — rje_envvar_exists","text":"","code":"rje_envvar_exists(key)"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/rje_envvar_exists.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper for clean env var check — rje_envvar_exists","text":"key environment variable key check.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/urls_test_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Test all Java URLs — urls_test_all","title":"Test all Java URLs — urls_test_all","text":"Test Java URLs","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/urls_test_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test all Java URLs — urls_test_all","text":"","code":"urls_test_all()"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/urls_test_all.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test all Java URLs — urls_test_all","text":"list results testing Java URLs.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":null,"dir":"Reference","previous_headings":"","what":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"Using specified Java version, set JAVA_HOME PATH environment variables current R session. Java distribtuion downloaded yet, download . installed cache directory yet, install set environment variables. intended quick easy way use different Java versions R scripts project, require different Java versions. example, one use scripts called targets package callr package.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"","code":"use_java( version = NULL, distribution = \"Corretto\", cache_path = getOption(\"rJavaEnv.cache_path\"), platform = platform_detect()$os, arch = platform_detect()$arch, quiet = TRUE )"},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"version Integer character vector length 1 major version Java download install. specified, defaults latest LTS version. Can \"8\", \"11\", \"17\", \"21\", \"22\", 8, 11, 17, 21, 22. distribution Java distribution download. specified, defaults \"Amazon Corretto\". Currently \"Amazon Corretto\" supported. cache_path destination directory download Java distribution . Defaults user-specific data directory. platform platform download Java distribution. Defaults current platform. arch architecture download Java distribution. Defaults current architecture. quiet logical value indicating whether suppress messages. Can TRUE FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"NULL. Prints message Java set current R session quiet set FALSE.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/reference/use_java.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Install specified Java version and set the JAVA_HOME and PATH environment variables in current R session — use_java","text":"","code":"if (FALSE) { # \\dontrun{ # set cache directory for Java to be in temporary directory options(rJavaEnv.cache_path = tempdir()) # install and set Java 8 in current R session use_java(8) # check Java version \"8\" == java_check_version_cmd(quiet = TRUE) \"8\" == java_check_version_rjava(quiet = TRUE) # install and set Java 17 in current R session use_java(17) # check Java version \"17\" == java_check_version_cmd(quiet = TRUE) \"17\" == java_check_version_rjava(quiet = TRUE) } # }"},{"path":"https://www.ekotov.pro/rJavaEnv/news/index.html","id":"rjavaenv-020-2024-08-28","dir":"Changelog","previous_headings":"","what":"rJavaEnv 0.2.0 (2024-08-28)","title":"rJavaEnv 0.2.0 (2024-08-28)","text":"Breaking change: java_check_version_cmd() java_check_version_rjava() now return detected Java version instead TRUE/FALSE New function use_java() download, install set Java cache current sesssion, without touching current project/working directory. intended use targets callr. New vignette using package targets' 'callr Updated documentation clearer instructions cache folder cleanup removing package Depends R > 4.0 able write package cache directory without extra user warning. Cache cleanup management functions provided, well documentation README vignettes.","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/news/index.html","id":"rjavaenv-012","dir":"Changelog","previous_headings":"","what":"rJavaEnv 0.1.2","title":"rJavaEnv 0.1.2","text":"CRAN release: 2024-08-26 Fixed broken links README.md","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/news/index.html","id":"rjavaenv-011","dir":"Changelog","previous_headings":"","what":"rJavaEnv 0.1.1","title":"rJavaEnv 0.1.1","text":"Improved documentation Better handling cache directory Bug fixes changes address CRAN reviewer’s comments first submission","code":""},{"path":"https://www.ekotov.pro/rJavaEnv/news/index.html","id":"rjavaenv-010","dir":"Changelog","previous_headings":"","what":"rJavaEnv 0.1.0","title":"rJavaEnv 0.1.0","text":"Initial release","code":""}]