Java implementation on Eclipse