web项目启动提示class path resource does not exist(eclipse构建classes)
来源:互联网 发布:结对编程搞笑图片 编辑:程序博客网 时间:2024/05/23 10:55
今天想搭建一个web工程,参考以前项目的结构,配置文件一般都会放到conf文件夹中,conf与src是同级的关系。刚开始只是建了一个conf,把配置文件丢进去了,部署到tomcat时却提示class path resource [config.xml] cannot be opened because it does not exist,就是说在classes中找不到config.xml。打开web-inf下的classes一看,果真是没有。为什么没有搞进来呢?后来才知道,是没有把conf弄到 build path中,只有build path中有的文件夹,编译后才会在classes中。
如下图,在add Folder中,把conf选中即可。
今天发现还有另一个用法,如果我们在工程中建了以下结构
demo
|--src(省略)
|--conf
|--a
|--b
......
如果我们右键conf,build path,Use as Source Folder,编译后的classes中会包括a和b文件夹。如果我们想把a和b中的文件也编辑到classes,不需要a和b文件夹,要直接选中a和b,右键,build path,Use as Source Folder,这样a和b中的东西就直接编译到classes中了。
0 0
- web项目启动提示class path resource does not exist(eclipse构建classes)
- eclipse项目报错怎么解决class path resource [beans.xml] cannot be opened because it does not exist
- Tomcat6启动或者发布项目时提示Publishing failed:Resource /xxxx does not exist
- 关于class path resource [WEB-INF/content/] cannot be resolved to URL because it does not exist解决办法
- eclipse error resource does not exist
- 关于class path resource [applicationContext.xml] cannot be opened because it does not exist
- class path resource [META-INF/xfire/services.xml] cannot be opened because it does not exist
- spring class path resource [jdbc.properties] cannot be opened because it does not exist
- class path resource [spring.xml] cannot be opened because it does not exist
- class path resource [applicationContext.xml] cannot be opened because it does not exist
- java.io.FileNotFoundException: class path resource ..cannot be opened because it does not exist
- class path resource [logConfig.xml] cannot be resolved to URL because it does not exist
- Spring问题:class path resource [xxx.xml] cannot be opened because it does not exist
- class path resource [applicationContext.xml] cannot be opened because it does not exist
- class path resource [spring-mvc.xml] cannot be opened because it does not exist
- class path resource [setting.xml] cannot be resolved to URL because it does not exist
- eclipse下项目报错class path resource [com/xzhang/mapping/] cannot be resolved to URL because it does not
- 关于使用MyEclipse启动web项目时工具报 The specified JRE installation does not exist 错误提示解决方法
- church计数
- cocos2d热更新代码分析
- 2016"百度之星" - 资格赛(Astar Round1)Problem C
- ubuntu14.10修改源
- 最近笔记2
- web项目启动提示class path resource does not exist(eclipse构建classes)
- oracle 从os文件读blob,从表中读blob写到os文件中
- 服务器监控(包括性能指标与web应用程序)
- 2016"百度之星" - 资格赛(Astar Round1)Problem D
- UIDeviceOrientation 和 UIInterfaceOrientation 设备旋转的用法
- iOS开发-解决AVAudioRecorder录音文件无法保存的问题
- 【网络爬虫】爬取糗事百科段子
- GeekBand C++第一周学习感悟
- Miko Android自学之路 WifiDirect中文最强详解,如何传输数据,如何设置GroupOwener,如何设置客户端以及服务器端