Easy startup batch file for Hudson


Recently i have been experimenting with Hudson. It’s quite easy to handle. You only need to download the hudson.war at the Hudson site, run it and connect to it with a browser at for example http://localhost:8080.

By default Hudson creates a data/configuration directory in your user directory. I do not like this when i’m experimenting. I also want to start Hudson manually. So i created this batch file.

@echo off
title hudson

rem change drive and the directory (so double click on file works)
CD %~p0

rem create the data/configuration directory (if it does not exist yet)
if exist data goto :aftermddata
md data


rem start hudson
set HUDSON_HOME=%~d0%~p0\data
java -jar hudson.war

Put this batch file and the war file in the same directory and just have a shortcut to the batch file or simply double click the batch file from your explorer. If there is no data/configuration directory yet, it will be created and Hudson will be started.


Leave a Reply