简体   繁体   English

在tomcat WEB-INF上的jar名称列表

[英]List of jar's names on tomcat WEB-INF

i would like to get a help on this subject. 我想在这个问题上获得帮助。 i'm new on this subject so if i not explain correctly, i apologize. 我是这个主题的新手,所以如果我不能正确解释,我深表歉意。 i run webapps project so its mean when i run the project, tomcat start to create a webapp file (war file) on the commant, first 'clean install' and then 'tomcat7:run-war' i run the project on eclipse. 我运行webapps项目,因此当我运行该项目时,tomcat开始在命令行上创建一个webapp文件(war文件),首先执行“全新安装”,然后执行“ tomcat7:run-war”,然后在eclipse上运行该项目。 my question is how i can get the name of the jar/s that created on war file while runing ? 我的问题是我如何在运行时获取在war文件上创建的jar的名称? i saw when i do 'clean install', under the root folder there is target folder which there created the jar who i looking to read his name. 我看到当我执行“全新安装”时,在根文件夹下有一个目标文件夹,该文件夹创建了我想要读取他的名字的jar。 i thougut about reflection but i dont know how exactly i need to do it. 我思考反射,但是我不知道我该怎么做。 thanks for everone for his help! 感谢大家的帮助!

如果您在jar文件中执行此代码,则应该可以获得其名称: https : //stackoverflow.com/a/320595/7746397

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM