One of the possible reasons for circular dependency is a chain of dependencies starting from some classes in a Java package. Let's say that com.packt.util traverses with a different package and reaches some other class in the same package, com.packt.util. This is a package arrangement issue that can be solved by moving the classes and restructuring the packages. You can perform such refactoring activities with modern IDEs.
Relocation of classes and packages
Get Java 9 Dependency Injection now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.