To simplify the configuration of JVM-level cluster framework and improve the efficiency of constructing JVM cluster system, an automated method of constructing the shared class set is presented. Static analysis on Java byte-code is used to detect and process the dependencies between elements. Firstly, for the interface oriented programming pattern, a solution of dependency derivation from abstract interface to specific business class is proposed, based on dependencies analysis. Then, the diffusion of dependencies is detected and processed to ensure the completeness of the shared class set. Finally, the proposed method is applied and tested on OncePortal middleware system. It is demonstrated that the method is feasible and effective in auto-constructing the Shared Class Set from a minority of roots without executing the Java source code.