java_install: Install Microsoft or Adoptium built OpenJDK Binaries

View source: R/javaHelpers.R

java_installR Documentation

Install Microsoft or Adoptium built OpenJDK Binaries

Description

[Maturing]

Install a package level version of Java.

Usage

java_install(
  installLocation = here::here("JavaEnv"),
  majorVersion = "11",
  source = c("microsoft", "adoptium"),
  os = c("windows", "linux", "macOS"),
  arch = c("x64", "aarch64")
)

java_get_versions(source = c("microsoft", "adoptium"))

Arguments

installLocation

The location you want to install Java to. Defaults to here::here("JavaEnv") in your project directory, but could also be stored to a 'renv' project directory, the user folder like '$USERPROFILE/AppData/Local'.

majorVersion

A major java version to download. Must be one listed by validJavaVersions().

source

What binary version do you want to install? Either 'microsoft' or 'adoptium'.

os

One of 'windows', 'linux', or 'macOS'. Currently only 'windows' is valid.

arch

One of 'x64' or 'aarch64'. 'x64' is default.

Value

Adds the unzipped/untared package to the location specified by installLocation.

Functions

  • java_install: Install java to specified location.

  • java_get_versions: Retrieve the versions of Java available at the download endpoint.

Examples

## Not run: 
java_install(
    installLocation = file.path(
        normalizePath(Sys.getenv("USERPROFILE"), winslash = "/"),
        'APPDATA', 'Local', "r-OpenJDK"
    ),
    majorVersion = "17", 
    source = "adoptium"
)

## End(Not run)


MARC-KC/marcR documentation built on June 2, 2022, 9:31 p.m.