Playframework 2.0 ClassNotFoundException [英] Playframework 2.0 ClassNotFoundException

查看:91
本文介绍了Playframework 2.0 ClassNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用play框架来开发Web应用程序.在开发过程中,我始终使用"play run"来启动服务器.

I have used play framework to develop a Web Application. Through the process of development I always used "play run" to start the server.

今天,我尝试通过运行"play start"来启动服务器进行部署,然后出现如下错误:

Today I tried to start the server for deployment by running "play start" and then I got error as follows:

java.lang.NoClassDefFoundError: Files
Caused by: java.lang.ClassNotFoundException: Files
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: Files.  Program will exit.
Exception in thread "main"

我认为这是路径中的空格",因为缺少类"的名称文件"使我想起了程序文件".但是我的剧本安装在没有空间的目录中.另外,我一直都可以运行"play run".

I believe it's a "space in path" because the "missing class" name "Files" reminds my about "Program Files". But my play was installed to a directory with no space. Also, I was able to run "play run" all the time.

我还应该寻找其他地方吗?

Are there any other place should I look for?

更新:此处,但该解决方案对我不起作用.

UPDATE: There is a similar question here but the solution does not work for me.

推荐答案

使用2.0.3发出播放开始"命令时遇到相同的问题.在2.0.4以下,我仍然遇到播放开始的问题,但是正在运行

Was having the same issue using 2.0.3 issuing the "play start" command. Under 2.0.4 I'm still getting the issue with play start, but running

play run 

的工作就像一种魅力.

works like a charm.

这篇关于Playframework 2.0 ClassNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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