introducing the idea jar package problems

       When writing a web file with the idea, I've jar packages are imported into the project, but when deployed to tomcat or can not find the problem appears related jar, has been do not understand what this is, obviously has imported jar project, and how can not be used.
       In fact, only the jar import our project is not enough, we have to see if there are jar package file after the project is compiled, the project at run time using a compiled files, so the jar package in the face of import project However, when not used, open the file after we compile the project, take a look at web-inf inside there is no jar package file. If not, open the idea, click Artifacts, selected in the middle column we want to add .war exploded jar file package, the package jar file in Available Elements in the right column, right-click after click put into output root, will join the jar package WEB-INF to the following


remarks:
      the role of Artifacts is for various documents after the project is compiled to integrate the project can be packaged into different forms of documentation, such as war, jar, war exploded and other forms. war, war exploede difference between the latter two file is not compressed, easy to view the file compiled. project options have a Project compilerc output directory, the role of public space in the output path of the entire work compiled for each item. The compiler output path Modules in specific individual projects Comoiler output, you can choose to inherit in the project can also select the output directory itself. To Artifacts where there is also a Output Directory, it is to copy the project and the module that was in the Classes file contributing to the Artifacts of WEN-INF directory below, and then Libraries in the jar package copy under WEB-INF, the project can start a.

Guess you like

Origin www.cnblogs.com/fbbg/p/11105798.html