I need a full Java project setup for Core Services to get Component details by using Java program
Welcome to TridionStackexchange!
Take look at the documentation for Interacting with the Core Service from Java
For a starting point, Mihas has done a Core service with Java client and placed his proxy classes in a Google code (open source) project, and he has written a few blogs about them:
Check those out and you will have everything you need to get started. Keep in mind these examples are written against SDL Tridion 2013, to have them work against version SDL Web 8.5, you will need to regenerate the proxies as the endpoints are different.
I hope it helps