What is Chocolatey ?
Chocolatey is a package manager for Windows similar to Homebrew on the MacOS, with features to install, configure, upgrade and uninstall Windows applications. Chocolatey works with all the existing Windows software installation technologies, runtime binaries and zip archives. It supports unattended and scripted package management with automatic configuration.
I will be using Chocolatey scripts to create a typical Java Developer Environment on a Windows machine.
These scripts can be used to setup, update or teardown the Java developer environments on a Windows machine.
-
Install Chocolatey
open a command window using the Run As Administrator option and, execute setup-chocolatey.cmd. -
Verify the installation is successful by typing
choco
in the command window.
-
Run setup-jde.cmd in the same command window to install the runtime (OpenJDK 11), build tools (maven, gradle), SCM (git) and utilities (putty, curl, postman, IntelliJ community edition) on the developer's Windows computer.
contents of the
setup-jde.cmd
choco feature enable -n allowGlobalConfirmation choco install -y openjdk maven gradle git atom putty curl postman db-visualizer 7zip intellijidea-community
-
Verify the installed applications of the Java Developer Environment.
-
C:\ProgramData\chocolatey
contains thechoco.exe
. -
Command syntax:
choco <operation> <application-name>
operation
isinstall
oruninstall
orupgrade
application-name
is obtained fromhttps://chocolatey.org/packages
-
https://chocolatey.org/packages
contains the details of the applications that can be installed usingchoco install
-
uninstall-jde.cmd is used to teardown the Java Developer Environment.
-
Installation log:
C:\ProgramData\chocolatey\logs\chocolatey.log