gpt4 book ai didi

java - par文件为什么我们在java开发中使用它

转载 作者:行者123 更新时间:2023-11-29 09:00:57 25 4
gpt4 key购买 nike

我们有一个插件架构的项目(使用了OSGi和Spring),我们大量使用pars。我找不到关于什么是 par 文件以及为什么要使用它的正确描述?

什么是 par 文件?为什么我们在插件开发中需要它?

最佳答案

Eclipse Virgo

An OSGi application is packaged as a JAR file, with extension .par. A PAR artifact offers several benefits:

  • A PAR file has an application name, version, symbolic name, and description.
  • The artifacts of a PAR file are scoped so that they cannot be shared accidentally by other applications. The scope forms a boundary for automatic propagation of load time weaving and bundle refresh.
  • The artifacts of a PAR have their exported packages imported by the synthetic context bundle which is used for thread context class loading. So, for example, hibernate will be able to load classes of any of the exported packages of the artifacts in a PAR file using Class.forName() (or equivalent).
  • The PAR file is visible to management interfaces.
  • The PAR file can be undeployed and redeployed as a unit.

A PAR includes one or more application bundles and its manifest specifies the following manifest headers:

关于java - par文件为什么我们在java开发中使用它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17484838/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com