Port parsing and java policy