fixed multiple instances of java declaration