I just want to get charts with a single click using SPSS in Java language to be able to import excel files automatically.
Integrating SPSS with Java is something which can't be achieved using standard methods and there is no way accomplishing this but "SPSS Writer" is a library which allows you to develop and deploy sophisticated reports across any platform using a set of compatible classes. Understanding the API from SPSS Writer could greatly improve your work and some class examples are located here.