Java : programmatically determine all of the package names loaded on the classpath

后端 未结 3 633
面向向阳花
面向向阳花 2021-01-11 17:59

Any suggestions as to how to approach how I would find out a list of package names that exist on the current classpath?

This needs

3条回答
  •  自闭症患者
    2021-01-11 18:41

    Give http://code.google.com/p/reflections/ a shot.

    Reflections scans your classpath, indexes the metadata, allows you to query it on runtime and may save and collect that information for many modules within your project.

提交回复
热议问题