简体   繁体   English

如何在Eclipse Oxygen中永久添加servlet JAR文件,而不是添加到每个项目中?

[英]How to add servlet JAR file permanently in Eclipse Oxygen instead of adding to each project?

有什么解决方案可以在Eclipse Oxygen中永久添加servlet JAR文件,而不是将其添加到每个项目中?

Maybe. 也许。 But I would not recommend this approach, because you would bind yourself to the IDE, which is not a good practice. 但是我不推荐这种方法,因为您会将自己绑定到IDE,这不是一个好习惯。 If someday you decide to switch to IntelliJ for example every project you will migrate will not work. 例如,如果某天您决定切换到IntelliJ,则将要迁移的每个项目都将无法工作。

If your projects use the same JAR file(s) and you want to share it instead of redeclaring it everytime you need it you could evaluate other options, like creating a parent pom.xml file (if you are using Maven). 如果您的项目使用相同的JAR文件,并且您想共享它而不是每次都需要重新声明它,则可以评估其他选项,例如创建父pom.xml文件(如果使用的是Maven)。 In this way you can share consistently all your updated through various IDEs. 这样,您可以通过各种IDE一致地共享所有更新。

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

相关问题 Eclipse-如何将一个项目作为Maven依赖项添加到另一个项目中,而不是作为一个jar添加? - Eclipse - How to add a project as a Maven dependency to another, instead of adding as a jar? 如何在Eclipse中添加Java项目而不是Jar - How to add Java project instead of Jar in eclipse 如何将模块添加到项目的Eclipse Oxygen模块路径中? - How do I add modules to the Eclipse Oxygen module path for a project? 如何将 JPA 工具添加到 Eclipse Oxygen 中的普通 Java 项目? - How to add JPA tooling to a plain Java project in Eclipse Oxygen? 如何在eclipse中为maven servlet项目生成一个可执行的jar文件并使用jar文件执行一个类? - How to generate an executable jar file for a maven servlet project in eclipse and execute a class using the jar file? 如何将jar文件添加到项目中,而不是添加到Tomcat lib文件夹中? - How can I add jar file to project instead of adding to Tomcat lib folder? 如何从jar文件向我的项目中的项目中添加几个类? - How to add few classes from a jar file to my project in eclipse? 如何在Eclipse中将可执行的jar文件添加到我的项目中? - How to add an executable jar file to my project in Eclipse? 如何在Eclipse中添加非Maven项目jar文件? - How to add a non maven project jar file in eclipse? 如何从命令行将jar文件添加到Eclipse Java项目中? - How to add a jar file to an eclipse java project from command line?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM