如何在PLAY框架中的JAVA中导入自定义包 [英] How to import custom package in JAVA in PLAY framework

查看:240
本文介绍了如何在PLAY框架中的JAVA中导入自定义包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用PLAY框架创建了一个Java项目. 但是,当我添加另一个项目的一些外部软件包时,会出现编译错误. 我还添加了所需的所有相关jar,并使我的原始项目依赖于具有MyUtils软件包的项目.

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.

错误:软件包MyUtils不存在"

"error: package MyUtils does not exist"

如何解决此问题?

推荐答案

您正在谈论项目和依赖项,就好像您正在处理Eclipse或类似项目一样,我相信我可以猜到您在做什么,这将使它成为现实.可以在eclipse中进行编译,但与您自己运行游戏时的工作方式无关.

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.

确保在项目的 lib 目录中具有包含MyUtils包的jar.

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

这篇关于如何在PLAY框架中的JAVA中导入自定义包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆