Reputation: 23
I am facing error when creating a Build on Jenkins. Following are the steps i have done.
Step1:
Create Folder "Java_Project"
Create File "Hello.Java"
public class Hello {
public static void main(String[] args) {
for (int i = 1; i <= 5; i++) {
System.out.println("Hellow World..." + i);
}
}}
Step2
a) javac Hello.java
b) Java Hello
and it print below result successfully.
D:\AWS_Assingnment\jenkins_assingnment\Java_Project>java Hello
Hellow World...1
Hellow World...2
Hellow World...3
Hellow World...4
Hellow World...5
Step 3
Now i go to my Jenkins and create a simple Build as follows.
Fig 1
Fig 2
Fig3 I AM ON WINDOWS
Enter Below Commands
cd d:\AWS_Assingnment\jenkins_assingnment\Java_Project
javac Hello.java
java Hello
Step 4 Create Build Fig 5
Gurus, Your Kind Support is needed.
Upvotes: 0
Views: 504
Reputation: 23
Problem Resolved.
And change the batch file as below
d:
cd \AWS_Assingnment\jenkins_assingnment\Java_Project
javac Hello.java
java Hello
Upvotes: 0