Jenkins: How to Create Builds with the Jenkins Freestyle Project
A Jenkins freestyle project is a repeatable build made up of build steps and post-build actions. You choose what runs at each stage, and there are dozens of standard plugins available to extend it. This blog walks through creating a freestyle job from scratch, pointing it at a Git repository, compiling a Java program, and checking the console output.
![]() |
| Jenkins create & build freestyle project |
The below topics are covered in this blog -
1) What is a freestyle project in Jenkins?
2) Creating a new freestyle build job
3) Configuring source code management with Git
4) Adding a build step
5) Running the build and reading the console output
1. Freestyle Project in Jenkins
A Jenkins project consists of build steps and post-build actions. The actions you can perform fall into three places: the build step, the post-build action, or a Jenkins pipeline. There are a large number of standard plugins available to cover most common requirements.
2. Creating a Freestyle Build Job
To create a Jenkins freestyle job, log in to your Jenkins dashboard. If Jenkins is hosted locally, visit http://localhost:8080. If it is hosted elsewhere, use that URL instead.
Step 1
Click New Item in the top left corner of your dashboard.
![]() |
| Jenkins New Item |
Step 2
Enter the name of the item, choose Freestyle project, and click OK.
![]() |
| Freestyle Project |
Step 3
Enter the details of the project you want to set up.
![]() |
| Jenkins Project Details |
Step 4
Under Source Code Management, enter your repository URL so Jenkins can clone it. For this example the URL is:
https://github.com/kriru/firstJava.git
![]() |
| Jenkins Setup Git Project |
Step 5
Click Add build step → Execute Windows batch command and add the commands you want to run. In our case:
javac HelloWorld.java
java HelloWorld
On a Linux or macOS agent, use Execute shell instead of Execute Windows batch command — the two commands themselves stay the same.
![]() |
| Jenkins Build Windows Batch Command |
Step 6
Click Apply & Save, then Build Now to check whether the build succeeds.
![]() |
| Jenkins Build Now |
![]() |
| Jenkins Build Successful |
Step 7
If you want to explore further, click Console Output to see the detailed result.
![]() |
| Jenkins Console Output |
Congratulations — we have executed our HelloWorld program from Jenkins.









3 comments :
Following BahrainMagazine has enriched my understanding of current events and technology. The website consistently balances local news with global perspectives, offering a seamless reading experience that is both informative and engaging.
By providing well-researched content, SaudiArabiaMagazine ensures its audience receives timely news, thoughtful technology coverage, and practical business insights, making it an essential resource for professionals and enthusiasts alike.
Every visit to MyBusinessTimes brings value, as it combines timely updates with expert insights, offering readers relevant business news, market trends, and technology breakthroughs that matter in today’s competitive landscape.
Post a Comment