Until you install Gradle and output "Hello World"

Introduction

I've only used Maven so far, so I decided to use Gradle. Here, we will carry out from the introduction of Gradle to the output of "Hello World".

Operating environment

Introducing Gradle

Get the latest Gradle from the official website

Download the latest Gradle zip file from Official Site.

Unzip to any location and set environment variables

Set the following two items.

Environment variable name value
GRADLE_HOME Unzipped folder path
Path %GRADLE_HOME%\bin

Operation check

Start a command prompt and enter "gradle -version". If there is a response as shown below, the installation is completed without any problem. image.png

Create a Java application project and output Hello World

Create a Java application project

Start the command prompt and execute "gradle init -type java -application" in any folder. A project folder is created.

Output Hello World

Move to the created project folder and execute "gradle run" on the command prompt. It should output "Hello World" as shown below. image.png

that's all.

Recommended Posts

Until you install Gradle and output "Hello World"
Hello world in Java and Gradle
Until you run Hello World of JavaFX with VS Code + Gradle
Build Java environment and output hello world [Beginner]
Hello World with SpringBoot / Gradle
Until "Hello World" with Spring Boot
Hello world with Kotlin and JavaFX
Hello World with Docker and C
Install Xcode and use Hello Swift!
Hello World with GWT 2.8.2 and Maven
Android OS (7.1.2) build and Hello World
Hello world with Kotlin and Tornado FX
(IntelliJ + gradle) Hello World with Spring Boot
Minimal Java environment construction and Hello World
Output Hello World in kotlin's simple main function
Try to display hello world with spring + gradle
Wastefully creative "Hello World" output method list (Java)
Ssh to Ubuntu on VirtualBox on your Mac and do it until you install Docker
Read "Hello world"
Java, Hello, world!
Java Hello World
How to install Gradle and Kotlin with SDKMAN (Mac)
Hello World comparison between Spark Framework and Spring Boot
Beginners write! Until you install postgreSQL on macOS catalina and make it available in rails 6.0.3.2