How to import custom package in JAVA in PLAY frame

2019-06-10 03:07发布

I have created a java project using PLAY framework. But when I added some external package of another project It gives Compilation error. I have also added all the relevant jars required.And also make my original project dependent on the project which has MyUtils package.

"error: package MyUtils does not exist"

How to fix this? Compilation error

2条回答
啃猪蹄的小仙女
2楼-- · 2019-06-10 03:48

Have you tried to create lib folder and add your jar to that directory? http://www.playframework.org/documentation/2.0.4/SBTDependencies

查看更多
Root(大扎)
3楼-- · 2019-06-10 03:51

You are talking about projects and dependencies as if you were working on eclipse or similar, and I believe I can guess what you're doing, which will make it compile in eclipse, but is not related to how it will work once you run play on its own.

Make sure that you have the jar that contains the MyUtils package in the lib dir of your project.

查看更多
登录 后发表回答