Skip to content

Latest commit

 

History

History
102 lines (71 loc) · 2.35 KB

File metadata and controls

102 lines (71 loc) · 2.35 KB

Install and use a tool on demand

In this tutorial you download a portable JDK and Node.js, uncompress them under %PRGS%, and put a chosen version on the PATH of one session, while other sessions stay untouched.

You need a working senv (see Your first senv) and an open session (senv typed in the current CMD window).

1. Download a tool

dwl jdk 21

dwl finds the latest JDK 21 archive online and downloads it into %PRGS%\setup. You see the download progress, then the archive name.

Do the same for Node.js:

dwl node 22

Tools and versions come from a curated list; dwl alone (no argument) opens a picker.

2. Install (uncompress) it

inst jdk
inst node

inst uncompresses the downloaded archive under the family folder and names the version folder by convention:

%PRGS%\javas\jdk21
%PRGS%\nodes\node22

No installer ran, no registry was touched: install means uncompress.

You could also have done both steps at once with div jdk 21.

3. Put a version on the session PATH

switchjdk 21

You should see the selected version, and JAVA_HOME now points at %PRGS%\javas\jdk21. Check:

java -version
echo %JAVA_HOME%

Same for Node:

switchnode 22
node -v

If several versions are installed and you give no number, a picker lets you choose. The switch commands only touch the current session: they remove any previous %PRGS%\javas (or nodes) entry from the local PATH, then prepend the chosen one.

4. See what changed, and what did not

Inspect the session PATH, entry by entry:

ppath javas

You see the %PRGS%\javas\jdk21\bin entry, marked as existing.

Now open a second CMD window, type senv, then:

java -version

The command is not found (or finds another default): the switch you did in the first window changed nothing globally, and nothing outside senv sessions was modified at any point.

👉 Next steps