There is a /s option in JRE installer (see here), so basically you can. However, you will have to somehow download JRE to client's workstation. I suggest using wget for this.

However, you can also use java-to-exe wrappers - JSmooth for example can automagically download JRE for you if it is not installed.

Answer from npe on Stack Overflow
🌐
Oracle
java.com › en › download › help › windows_manual_download.html
How do I manually download and install Java for my Windows computer?
This will download an executable file (example: jre-8u333-windows-i586-iftw.exe) to the default download location on the local system Note: You can opt to save this file to any other known location on your local system for later installation. Double click on executable file to run the installer and this will launch a User Account Control dialog indicating confirmation if you want to allow this app to make changes to your device? image Click Yes to continue. The installation process starts with appearance of Java Setup - Welcome dialog box.
🌐
Princeton CS
introcs.cs.princeton.edu › java › 15inout › windows-cmd.html
Java and the Windows Command Prompt
You will use the Java compiler javac to compile your Java programs and the Java interpreter java to run them. You should skip the first step if Java is already installed on your machine. Download and install the latest version of the Java Platform, Standard Edition Development Kit (Java SE 6 Update 27).
🌐
W3Schools
w3schools.com › java › java_getstarted.asp
Java Getting Started
To check if you have Java installed ... mixed mode) If you do not have Java installed on your computer, you can download it at oracle.com....
Top answer
1 of 2
3

From the tutorial you linked, it tells you to "consult the installation instructions" found here: https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html

For Windows JDK, the instructions linked are here: https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html#CHDEBCCJ

The part you need to look for is "Updating the PATH Environment Variable"

Updating the PATH Environment Variable

If you do not set the PATH variable, you need to specify the full path to the executable file every time you run it, such as:

C:> "C:\Program Files\Java\jdk1.8.0\bin\javac" MyClass.java

It is useful to set the PATH variable permanently so it will persist after rebooting.

To set the PATH variable permanently, add the full path of the jdk1.8.0\bin directory to the PATH variable. Typically, this full path looks something like C:\Program Files\Java\jdk1.8.0\bin. Set the PATH variable as follows on Microsoft Windows:

Click Start, then Control Panel, then System.

Click Advanced, then Environment Variables.

Add the location of the bin folder of the JDK installation to the PATH variable in System Variables. The following is a typical value

for the PATH variable:

C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0\bin

Note:

The PATH environment variable is a series of directories separated by semicolons (;) and is not case-sensitive. Microsoft Windows looks

for programs in the PATH directories in order, from left to right.

You should only have one bin directory for a JDK in the path at a time. Those following the first instance are ignored.

If you are not sure where to add the JDK path, append it.

The new path takes effect in each new command window you open after setting the PATH variable.
2 of 2
0

When ever we execute any command, it is searched in the directory where we are current in or mentioned in PATH environment variable. The oly thing which you need is just add <path of yourjdk>\bin to PATH

Windows 10 and Windows 8

  • In Search, search for and then select: System (Control Panel)
  • Click the Advanced system settings link.
  • Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
  • In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
  • In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.

Windows 7

  • From the desktop, right click the Computer icon.
  • Choose Properties from the context menu.
  • Click the Advanced system settings link.
  • Click the Advanced system settings link.
  • In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
  • Reopen Command prompt window, and run your java code.
🌐
Oracle
java.com › en › download › help › log_files.html
Java software installation log files
Goto java.com and click on the Free Java Download button. Click on the Save button and save Java software on the Desktop · Verify that Java software is saved on the Desktop. Open Windows Command Prompt window. Windows XP: Click Start -> Run -> Type: cmd Windows Vista and Windows 7: Click Start ...
🌐
Oracle
java.com › en › download › manual.jsp
Download Java
» What is Java » Remove older versions » Security » Support » Other help · This download is for end users who need Java for running applications on desktops or laptops. Java 8 integrates with your operating system to run separately installed Java applications.
Find elsewhere
🌐
Oracle
docs.oracle.com › javacomponents › msi-jre › install-guide › installing-jre-command-line.htm
Installing the JRE from the Command Line
You can install the JRE by downloading the appropriate Oracle JRE 9 MSI Enterprise Installer for your system and running it from the command line.
🌐
Saylor Academy
learn.saylor.org › mod › book › view.php
1.1. How To Install JDK on Windows: Steps 0-4
Privacy Policy Terms of Use · © Saylor University 2010-2026 except as otherwise noted. Excluding course final exams, content authored by Saylor University is available under a Creative Commons Attribution 3.0 Unported license. Third-party materials are the copyright of their respective owners ...
🌐
PhoenixNAP
phoenixnap.com › home › kb › devops and development › how to install java on windows
How to Install Java on Windows
December 11, 2025 - Wait for the download to complete. Note: If you need to set up Java on a different system, check out our tutorials for installing Java on Ubuntu, Fedora, Raspberry Pi, and CentOS.
🌐
CodingTechRoom
codingtechroom.com › question › install-java-cmd-script
How to Install Java Using a CMD Script? - CodingTechRoom
... @echo off :: Step 1: Download Java JDK set JDK_URL=https://download.oracle.com/java/17/archive/jdk-17_windows-x64_bin.exe set JDK_INSTALLER=jdk-17_windows-x64_bin.exe powershell -Command "Invoke-WebRequest -Uri %JDK_URL% -OutFile ...
🌐
freeCodeCamp
freecodecamp.org › news › how-to-install-java-on-windows
How to Install Java on Windows
March 3, 2022 - You can select the country closer to you to get a better download speed, but if you do not want that and just download from the global site instead, that's fine, too. You will get the exact installer file from there as well. Then the website might reloaded itself. Click on Products. Then click Java.
🌐
NTU Singapore
www3.ntu.edu.sg › home › ehchua › programming › howto › jdk_howto.html
How to Install JDK (on Windows, Mac OS, Ubuntu) and Get Started with Java Programming
Variable name : PATH Variable value : c:\Program Files\Java\jdk-15.0.{x}\bin;[do not delete exiting entries...] You need to re-started CMD for the new environment settings to take effect.
🌐
Oracle Java
dev.java › download
Downloading Java - Dev.java
This setup provides options for Oracle JDK, OpenJDK, but also allows you to choose from any locally installed JDKs. If you already have JDK binaries downloaded in your system, you can point the JDK Downloader to their specific path. Click Install and start setup button and enjoy coding with Java!
🌐
GeeksforGeeks
geeksforgeeks.org › linux-unix › download-install-java-windows-linux-macos
Installing Java on Windows, Linux, and macOS - GeeksforGeeks
April 20, 2026 - Proper configuration of environment variables (JAVA_HOME, PATH) is essential. Here, we will discuss how to download and install Java on a Windows 64-bit Machine and set up the environment to run the first Java program on the command prompt. The process is the same for all Windows i.e.
🌐
Java
download.java.net › java › early_access › valhalla › docs › specs › man › jcmd.html
The jcmd Command
The command must be a valid jcmd command for the selected JVM. The list of available commands for jcmd is obtained by running the help command (jcmd pid help) where pid is the process ID for the running Java process. If the pid is 0, commands will be sent to all Java processes.