Legacy systems are valuable assets for organisations. They continuously evolve with new emerged technologies in rapidly changing business environment. ICENI provided an excellent Grid middleware framework for developing Grid-based systems. It creates an opportunity for legacy systems to evolve in Grid environment. In this paper, we propose a component-based reengineering approach which applies software clustering techniques and program slicing techniques to recover components from legacy systems. It supports component encapsulation with JNI and component integration with CXML. The resulting components with core legacy code function in Grid environment.