You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.qmd
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,19 @@ As part of normal operation, `rJavaEnv` will update the `JAVA_HOME` and `PATH` e
96
96
rje_consent(provided=TRUE)
97
97
```
98
98
99
+
## Using `rJavaEnv` with `targets` and `callr`
100
+
101
+
Just insert this line into the begining of any script that you run with `targets` or `callr`:
102
+
103
+
```r
104
+
rJavaEnv::use_java("21")
105
+
```
106
+
107
+
This acts exactly like `java_quick_install()`, but only sets the environment variables in the current session and does not copy or link `Java` binaries into the project directory.
108
+
109
+
More details are in the vignette [Multiple `Java` environments in one project with `targets` and `callr`](https://www.ekotov.pro/rJavaEnv/articles/multiple-java-with-targets-callr.qmd).
110
+
111
+
99
112
## Functions Overview
100
113
101
114
The package has several core functions:
@@ -127,6 +140,9 @@ The package has several core functions:
127
140
9.`java_clear()`
128
141
* Removes all or some `Java` versions linked in the current project (or cached distributions or installations).
129
142
143
+
10.`use_java()`
144
+
* Same as `java_quick_install()`, but in a less intrusive way. Does not copy or link the `Java` installation folder from cache into the project directory and does not create or edit your `.Rprofile` file. Only sets requested java in the current R session.
145
+
130
146
See more details on all the functions in the [Reference](https://www.ekotov.pro/rJavaEnv/reference/index.html){target="_blank"}.
0 commit comments