James Gosling resigns from Sun