1、首先配置正确Project Struct

保证需要引用的jar包库添加到Libraries里,尽管添加到Modules里依然可以测试运行或调试,但导出的jar包会遇到问题。
2、导出jar,方式选择如下

选择"From modules with dependencies"

然后去掉以上"Extracted"类型的包,添加右侧Libriary的库,双击添加进来。

3、配置class-path为"./"当前目录,作为搜索入口路径。

这样导出的jar包,再通过java -jar *.jar就可以正常运行了!