在环境变量CLASSPATH中应该有什么 [英] What should I have in the environnment variable CLASSPATH
问题描述
我尝试运行我的项目时有一个例外: java.lang.NoClassDefFoundError:无法初始化类
。
I have an exception when I try to run my project : java.lang.NoClassDefFoundError : Could not initialize class
.
我发现环境变量 CLASSPATH
是一个问题。
I found that it was a problem with the environnment variable CLASSPATH
.
现在, /opt/persyst/apache-tomcat-7.0.65/bin/bootstrap.jar:/opt/persyst/apache-tomcat-7.0.65/bin/tomcat-juli.jar
这似乎真的很奇怪。所以我不知道这个变量应该有什么。有人可以帮助我吗?
For now, it is /opt/persyst/apache-tomcat-7.0.65/bin/bootstrap.jar:/opt/persyst/apache-tomcat-7.0.65/bin/tomcat-juli.jar
And it seems really weird. So I don't know what I should have in this variable. Can someone help me please ?
推荐答案
永远记住将你的所有html,css,图像,jsp文件添加到你的
$ Tomcat_Home / webapps / your-project-directory和您的java文件:
$ Tomcat_Home / webapps / your-project-directory / WEB-INF / classes和您的jar文件:
$ Tomcat_Home / webapps / your-project-directory / WEB-INF / lib
Always remember to add your all html, css, images, jsp files in your: $Tomcat_Home/webapps/your-project-directory and your java files in: $Tomcat_Home/webapps/your-project-directory/WEB-INF/classes and your jar files in: $Tomcat_Home/webapps/your-project-directory/WEB-INF/lib
希望这将帮助您整理NCDF异常
Hope this will help you to sort out NCDF exception
这篇关于在环境变量CLASSPATH中应该有什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!