Want to connect Java with Apigee to populate cache with certain keyFragments.
Populate cache works in side proxy and it doesn't need a java code to cache. You should have proper key fragment configuration and the caching value in the policy execution flow.
If you have something different requirement, please specify clearly.
Not clear exactly what you're asking. Maybe you could clarify.