Fix Java detector