//To change the port in command line we use --httpPort command line option java -jar jenkins.war --httpPort=8081