Changed BSServer to work in java 1.6