为什么Eclipse在Play Framework渲染方法中显示错误? [英] Why Eclipse shows error with Play Framework render method?

查看:153
本文介绍了为什么Eclipse在Play Framework渲染方法中显示错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误:

public static Result home(String name)
{           
    return ok(home.render(name));
}

对于Eclipse说, home不能解决。我知道它更像是Scala而不是Java,但是我有什么方法可以摆脱这些错误。好吧,没有禁用错误消息(我在这里看到很多这样的答案)。另外,无论如何我可以让我的Eclipse工作自动完成Scala吗?

For which Eclipse says, home can't be resolved. I know it is more of Scala than Java, but is there any way I can get rid of such errors. Well, without disabling error messaging (I see lot of such answers here on SO). Also, is there anyway I can make my Eclipse work autocomplete for Scala ?

啊,我刚才注意到还有一个问题。要使用外部jar,我所有人都将jar保存在lib文件夹中并再次从cli运行eclipse。它在浏览器中运行良好,但是根据Eclipse,使用jar的类是完全错误的。

Ah, I just noticed one more problem there. To use an external jar, all I have too keep jars in a lib folder and run eclipse again from cli. It works fine in browser but a class making use of jars is all wrong, as per Eclipse.

推荐答案

使用 eclipse 命令,从eclipse构建项目并刷新项目。

Use eclipse command, build the project from eclipse and refresh the project.

这篇关于为什么Eclipse在Play Framework渲染方法中显示错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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