How to include all the jars present at a particular directory in the CLASSPATH in one go? [duplicate]

家住魔仙堡 提交于 2019-12-03 09:32:54
skaffman

Yes, you can use a wildcard, as of Java6. See the section on "Understanding class path wildcards"

Class path entries can contain the basename wildcard character *, which is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR. For example, the class path entry foo/* specifies all JAR files in the directory named foo. A classpath entry consisting simply of * expands to a list of all the jar files in the current directory.

Prior to Java 6, you had to specify them all individually.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!