首页 > 编程知识 正文

vscode怎么创建java项目(manifest文件添加第三方包)

时间:2023-05-05 02:22:32 阅读:75650 作者:2058

I noticed that JAR,warandearfileshaveamanifest.mffileunderthemeta-INF folder。

whatistheuseofthemanifest.MF file? watallthingscanbespecifiedinthisfile?

thecontentofthemanifestfileinajarfilecreatedwithversion 1.0 ofthejavadevelopmentkitisthefollowing。

alltheentriesareasname-value pairs.thenameofaheaderisseparatedfromitsvaluebyacolon.thedefaultmanifestshowsthatitconformstton

themanifestcanalsocontaininformationabouttheotherfilesthatarepackagedinthearchive.exactlywhatfileinformationisrecordedintheme eduseforthejarfile.thedefaultmanifestfilemakesnoassumptionsaboutwhatinformationitshouldrecordaboutout er files,soitssingleler

特殊采购管理头

dependingontheintendedroleofthejarfile,thedefaultmanifestmayhavetobemodified.ifthejarfileiscreatedonlyforthepurposeofarcharchied

mostusesofjarfilesgobeyondsimplearchivingandcompressionandrequirespecialinformationtobeinthemanifestfile.summmarizedbelowarebarebarebebebestfestfile ersthatarerequiredforsomespecial-purpose jar -文件功能

applicationsbundledasjarfiles 3360 ifanapplicationisbundledinajarfile, thejavavirtualmachineneedstobetoldwhattheentrypointtotheapplicationis.anentrypointisanyclasswithapublicstaticvoidmain (g令人担心ionisprovidedinthemain-class header,which has the general form:

Main-Class: classname

thevalueclassnameistobereplacedwiththeapplication ' sentry point。

download extensions 3360 downloadextensionsarejarfilesthatarereferencedbythemanifestfilesofotherjarfiles.inatypicalsituation, anappletwillbebundledinajarfilewhosemanifestreferencesajarfile (orseveraljarfiles ) )。 thatwillserveasanextensionforthepurposesofthatapplet.extensionsmayreferenceeachotherinthesameway。

downloadextensionsarespecifiedintheclass-pathheaderfieldinthemanifestfileofanapplet,application,oranotherextension.AC ll

class-path : servlet.jarinfobus.jar acme/beans.jar

With this header,theclassesinthefilesservlet.jar,infobus.jar,and acme/beans.jarwillserveasextensionsforpurposesofthofthther

package sealing : apackagewithinajarfilecanbeoptionallysealed, whichmeansthatallclassesdefinedinthatpackagemustbearchivedinthesamejarfile.apackagemightbesealedtoensureversionsistencyam

To seal a package,anameheaderneedstobeaddedforthepackage,followed by a Sealed header,similar to this:

name : my公司/my package /

sealed :真

the name header ' svalueisthepackage ' srelativepathname.notethatitendswitha '/' todistinguishitfromafilename.anyheadersfofore withoutanyinterveningblanklines,applytothefileorpackagespecifiedinthenameheader.intheaboveeexample, becausethesealedheaderoccursafterthename : my company/my package header,with no blank lines between,thesealedheaderwillbeintenter

包版本3360 thepackageversioningspecificationdefinesseveralmanifestheaderstoholdversioninginformation.onesetofsuch heversioningheadersshouldappeardirectlybeneaththenameheaderforthepackage.thisexampleshowsallthe

Name: java/util/

specification-title 3360 ' javautilityclasses '

规范版本: ' 1.2 '

规范-供应商: ' sun Microsystems,Inc.'。

implementation-title 3360 ' Java.util '

implementation-version : ' build 57 '

implementation-vendor : ' sun Microsystems,Inc.'

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。