Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个可运行的 jar,但是当我运行它时:
java -jar myjar.jar
我收到此错误:
Caused by: org.hibernate.HibernateException: hibernate.cfg.xml not found
该文件位于文件夹资源中。所以我用winzip修改了我的清单,以这种方式添加了资源目录:
Class-Path: . ./resources
但我仍然得到同样的错误。
我做错了什么?我应该怎么做?
根据这个花花公子类目录必须以/结尾。所以使用./resources/
./resources/