在Windows中运行Play Framework 2.0,出现了NoClassDefFoundError [英] Running Play Framework 2.0 in Windows, got a NoClassDefFoundError
本文介绍了在Windows中运行Play Framework 2.0,出现了NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在Windows(XP)中运行Play Framework 2.0,但是当我启动play时,却遇到了这个异常:
I'm trying to run Play Framework 2.0 in windows (XP), but when I launch play, I got this exception :
>play.bat
Exception in thread "main" java.lang.NoClassDefFoundError: and
Caused by: java.lang.ClassNotFoundException: and
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: and. Program will exit.
我找不到为什么出现此错误.当然,我已经安装了Java:
I can't find why I have this error. Of course I have Java installed :
>java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
和javac:
>javac -version
javac 1.6.0_31
我想念什么?
感谢您的帮助.
推荐答案
好吧,对于那些有相同问题的人,实际上很简单.
Ok, for those who have the same problem, it's quite simple in fact.
我在我的文档"中运行Play,整个路径包含空格.
I was running Play in "My Documents" and the whole path contained space.
为了玩!要工作,您必须将项目放在没有空格的文件夹中,例如:
In order for Play! to work, you'll have to put your project in a folder without spaces, like :
C:\ dev \ play \ 2.0 \
C:\dev\play\2.0\
它将起作用:)
这篇关于在Windows中运行Play Framework 2.0,出现了NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文