# 3.1 Create jobs

we will create a job in Jenkins which picks up a simple HelloWorld application, builds and runs the java program.

**Step 1**− Go to the Jenkins dashboard and Click on New Item

![](/files/-M4S6n2FA8GWWW1ItyY4)

**Step 2**− In the next screen, enter the Item name, in this case we have named it Helloworld. Choose the ‘Freestyle project option’

![](/files/-M4S6n2Hs0ZDYKzZHKWI)

**Step 3**− The following screen will come up in which you can specify the details of the job.

![](/files/-M4S6n2Jd7L8mFYEM9wK)

**Step 4**− We need to specify the location of files which need to be built. In this example, we will assume that a local git repository(E:\Program) has been setup which contains a ‘HelloWorld.java’ file. Hence scroll down and click on the Git option and enter the URL of the local git repository.

**Note**− If you repository if hosted on Github, you can also enter the url of that repository here. In addition to this, you would need to click on the Add button for the credentials to add a user name and password to the github repository so that the code can be picked up from the remote repository.

![](/files/-M4S6n2LhlchpaXNxTVl)

**Step 5**− Now go to the Build section and click on Add build step → Execute Windows batch command

![](/files/-M4S6n2N8U7P8sqlxzg5)

**Step 6**− In the command window, enter the following commands and then click on the Save button.

```
Javac HelloWorld.java
Java HelloWorld
```

![](/files/-M4S6n2PUE44MA4v_Dew)

**Step 7**− Once saved, you can click on the Build Now option to see if you have successfully defined the job.

![](/files/-M4S6n2RjZUxTUxwqQxb)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://n-saikiran.gitbook.io/jenkins/how-to-use-jenkins/create-jobs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
