如何在eclipse中的classpath上放置文件? [英] How to place a file on classpath in eclipse?

查看:120
本文介绍了如何在eclipse中的classpath上放置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如本文档(http://activemq.apache.org/jndi-support.html)所述,例如,如果将此jndi.properties文件放在类路径上,但是如何将.properties文件在我的classpath上,如果我使用eclipse?
非常感谢。

As this documentation (http://activemq.apache.org/jndi-support.html) says, "For example if you place this jndi.properties file on your classpath", but how can I place the .properties file on my classpath if I am using eclipse? Thanks a lot.

推荐答案

一个选项是将属性文件放在项目的src /目录中。这将在构建时将其复制到类(以及.class文件)。我经常为网络项目做这个。

One option is to place your properties file in the src/ directory of your project. This will copy it to the "classes" (along with your .class files) at build time. I often do this for web projects.

这篇关于如何在eclipse中的classpath上放置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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