如何在powershell查看.jar文件的java编译版本

发布时间:2024年01月04日

整体过程

总的流程如下:

1. 获取.jar文件的绝对地址,即$JarPath

$JarPath = 

2. 选择.jar文件任意一个类,即$ClassName

$ClassName = 

3. 使用以下命令找到major字段跟着数字,即

javap -verbose -cp $JarPath $ClassName | Select-String "major"

$JarPath容易得出,但$ClassName又怎样获取?

这就需要用到命令

jar -tf $JarPath

下面我以本地的两个库mujava.jar和openjava.jar为例子

例子一

首先查看openjava.jar包含的所有类名

jar -tf "C:\Libraries\mujava\openjava.jar"

结果如下

META-INF/
META-INF/MANIFEST.MF
jp/
jp/ac/
jp/ac/tsukuba/
jp/ac/tsukuba/openjava/
openjava/
openjava/mop/
openjava/mop/edit/
openjava/ojc/
openjava/ptree/
openjava/ptree/util/
openjava/syntax/
openjava/test/
openjava/test/stringPlay/
openjava/tools/
openjava/tools/parser/
jp/ac/tsukuba/openjava/NullCompiler.class
jp/ac/tsukuba/openjava/OldJavaCompiler.class
jp/ac/tsukuba/openjava/SunJavaCompiler.class
jp/ac/tsukuba/openjava/SunLibCompiler.class
openjava/mop/AmbiguousClassesException.class
openjava/mop/AnonymousClassEnvironment.class
openjava/mop/CannotAlterException.class
openjava/mop/CannotExecuteException.class
openjava/mop/CannotInspectException.class
openjava/mop/ClassEnvironment.class
openjava/mop/ClosedEnvironment.class
openjava/mop/Environment.class
openjava/mop/FileEnvironment.class
openjava/mop/GlobalEnvironment.class
openjava/mop/MOPException.class
openjava/mop/MetaInfo.class
openjava/mop/Metaclass.class
openjava/mop/NoSuchMemberException.class
openjava/mop/OJClass.class
openjava/mop/OJClassArray.class
openjava/mop/OJClassByteCode.class
openjava/mop/OJClassImp.class
openjava/mop/OJClassNotFoundException.class
openjava/mop/OJClassNull.class
openjava/mop/OJClassSourceCode.class
openjava/mop/OJConstructor.class
openjava/mop/OJConstructorByteCode.class
openjava/mop/OJConstructorImp.class
openjava/mop/OJConstructorSourceCode.class
openjava/mop/OJEnumConstant.class
openjava/mop/OJEnumConstantByteCode.class
openjava/mop/OJEnumConstantImp.class
openjava/mop/OJEnumConstantSourceCode.class
openjava/mop/OJField.class
openjava/mop/OJFieldByteCode.class
openjava/mop/OJFieldImp.class
openjava/mop/OJFieldSourceCode.class
openjava/mop/OJMember.class
openjava/mop/OJMethod.class
openjava/mop/OJMethodByteCode.class
openjava/mop/OJMethodImp.class
openjava/mop/OJMethodSourceCode.class
openjava/mop/OJModifier.class
openjava/mop/OJPrimitive.class
openjava/mop/OJSystem.class
openjava/mop/Signature.class
openjava/mop/Toolbox.class
openjava/mop/edit/OJEditableClass.class
openjava/ojc/CommandArguments.class
openjava/ojc/Compiler.class
openjava/ojc/JavaCompiler.class
openjava/ojc/Main.class
openjava/ojc/TranslatorThread.class
openjava/ptree/AllocationExpression.class
openjava/ptree/ArrayAccess.class
openjava/ptree/ArrayAllocationExpression.class
openjava/ptree/ArrayInitializer.class
openjava/ptree/AssertStatement.class
openjava/ptree/AssignmentExpression.class
openjava/ptree/BinaryExpression.class
openjava/ptree/Block.class
openjava/ptree/BreakStatement.class
openjava/ptree/CaseGroup.class
openjava/ptree/CaseGroupList.class
openjava/ptree/CaseLabel.class
openjava/ptree/CaseLabelList.class
openjava/ptree/CastExpression.class
openjava/ptree/CatchBlock.class
openjava/ptree/CatchList.class
openjava/ptree/ClassDeclaration.class
openjava/ptree/ClassDeclarationList.class
openjava/ptree/ClassLiteral.class
openjava/ptree/CompilationUnit.class
openjava/ptree/ConditionalExpression.class
openjava/ptree/ConstructorDeclaration.class
openjava/ptree/ConstructorInvocation.class
openjava/ptree/ContinueStatement.class
openjava/ptree/DoWhileStatement.class
openjava/ptree/EmptyStatement.class
openjava/ptree/EnumConstant.class
openjava/ptree/EnumConstantList.class
openjava/ptree/EnumDeclaration.class
openjava/ptree/Expression.class
openjava/ptree/ExpressionList.class
openjava/ptree/ExpressionObject.class
openjava/ptree/ExpressionStatement.class
openjava/ptree/FieldAccess.class
openjava/ptree/FieldDeclaration.class
openjava/ptree/ForStatement.class
openjava/ptree/IfStatement.class
openjava/ptree/InstanceofExpression.class
openjava/ptree/LabeledStatement.class
openjava/ptree/Leaf.class
openjava/ptree/List.class
openjava/ptree/Literal.class
openjava/ptree/MemberDeclaration.class
openjava/ptree/MemberDeclarationList.class
openjava/ptree/MemberInitializer.class
openjava/ptree/MethodCall.class
openjava/ptree/MethodDeclaration.class
openjava/ptree/ModifierList.class
openjava/ptree/NonLeaf.class
openjava/ptree/ObjectList.class
openjava/ptree/Parameter.class
openjava/ptree/ParameterList.class
openjava/ptree/ParseTree.class
openjava/ptree/ParseTreeException.class
openjava/ptree/ParseTreeObject.class
openjava/ptree/ReturnStatement.class
openjava/ptree/SelfAccess.class
openjava/ptree/Statement.class
openjava/ptree/StatementList.class
openjava/ptree/SwitchStatement.class
openjava/ptree/SynchronizedStatement.class
openjava/ptree/ThrowStatement.class
openjava/ptree/TryStatement.class
openjava/ptree/TypeName.class
openjava/ptree/TypeParameter.class
openjava/ptree/TypeParameterList.class
openjava/ptree/UnaryExpression.class
openjava/ptree/Variable.class
openjava/ptree/VariableDeclaration.class
openjava/ptree/VariableDeclarator.class
openjava/ptree/VariableInitializer.class
openjava/ptree/WhileStatement.class
openjava/ptree/util/ClassLiteralReplacer.class
openjava/ptree/util/EvaluationShuttle.class
openjava/ptree/util/ExpansionApplier.class
openjava/ptree/util/MemberAccessCorrector.class
openjava/ptree/util/ParseTreeVisitor.class
openjava/ptree/util/PartialParser.class
openjava/ptree/util/ScopeHandler.class
openjava/ptree/util/SourceCodeWriter.class
openjava/ptree/util/TypeNameQualifier.class
openjava/ptree/util/VariableBinder.class
openjava/syntax/AbstractSyntaxRule.class
openjava/syntax/BlockRule.class
openjava/syntax/CompositeRule.class
openjava/syntax/DefaultListRule.class
openjava/syntax/ExpressionListRule.class
openjava/syntax/ExpressionRule.class
openjava/syntax/IdentifierRule.class
openjava/syntax/IterationRule.class
openjava/syntax/JavaSyntaxRules.class
openjava/syntax/NameRule.class
openjava/syntax/PrepPhraseRule.class
openjava/syntax/RestorableTokenSource.class
openjava/syntax/SelectionRule.class
openjava/syntax/SeparatedListRule.class
openjava/syntax/StatementRule.class
openjava/syntax/SyntaxException.class
openjava/syntax/SyntaxRule.class
openjava/syntax/TokenID.class
openjava/syntax/TokenRule.class
openjava/syntax/TokenSource.class
openjava/syntax/TypeNameRule.class
openjava/test/Box$InnerBox.class
openjava/test/Box.class
openjava/test/Box1$InnerBox.class
openjava/test/Box1.class
openjava/test/Crosslexic$1.class
openjava/test/Crosslexic$2.class
openjava/test/Crosslexic$myListCellRenderer.class
openjava/test/Crosslexic$repaintlist.class
openjava/test/Crosslexic.class
openjava/test/Dictionary.class
openjava/test/Edge.class
openjava/test/ExprParserTokenTypes.class
openjava/test/Flower$1OriginalState.class
openjava/test/Flower.class
openjava/test/Graph.class
openjava/test/GraphBase.class
openjava/test/InvalidGraphException.class
openjava/test/InvalidOperatorException.class
openjava/test/Node.class
openjava/test/ParserTest.class
openjava/test/Path.class
openjava/test/Planet$1$class1$haha.class
openjava/test/Planet$1$class1.class
openjava/test/Planet$1.class
openjava/test/Planet.class
openjava/test/RequestForEnhancement.class
openjava/test/Search.class
openjava/test/TruthTable.class
openjava/test/VendingMachine$Planet$SecondSeason.class
openjava/test/VendingMachine$Planet.class
openjava/test/VendingMachine$Season.class
openjava/test/VendingMachine$haha.class
openjava/test/VendingMachine.class
openjava/test/VendingMachine1.class
openjava/test/stringPlay/Application.class
openjava/test/stringPlay/StringTools.class
openjava/test/stringPlay/stringPlay.class
openjava/tools/DebugOut.class
openjava/tools/WriterStack.class
openjava/tools/parser/ASCII_UCodeESC_CharStream.class
openjava/tools/parser/CustomTokenManager.class
openjava/tools/parser/IntAndObj.class
openjava/tools/parser/JavaCharStream.class
openjava/tools/parser/JavaParserConstants.class
openjava/tools/parser/MyToken.class
openjava/tools/parser/ParseException.class
openjava/tools/parser/Parser$1.class
openjava/tools/parser/Parser$JJCalls.class
openjava/tools/parser/Parser$LookaheadSuccess.class
openjava/tools/parser/Parser.class
openjava/tools/parser/ParserConstants.class
openjava/tools/parser/ParserTokenManager.class
openjava/tools/parser/Token.class
openjava/tools/parser/TokenIDPublisher.class
openjava/tools/parser/TokenMgrError.class
openjava/tools/parser/TokenSourceAdapter.class

选中其中的一个类查看编译字段

javap -verbose -cp "C:\Libraries\mujava\openjava.jar" "openjava.mop.OJClass" | Select-String "major"

结果如下

major version: 50

可见这个类编译版本是java SE 6

例子二

首先查看mujava.jar包含的所有类名

jar -tf "C:\Libraries\mujava\mujava.jar"

结果如下

META-INF/MANIFEST.MF
.classpath
doc/.DS_Store
doc/fig/AORBresult.jpg
doc/fig/absolutepath.png
doc/fig/debugmode.png
doc/fig/genmutes.png
doc/fig/markeq.png
doc/fig/percent.png
doc/fig/run1.png
doc/fig/session.jpg
doc/fig/testnew.png
doc/fig/testset.png
doc/muJavaDoc3.aux
doc/muJavaDoc3.log
doc/muJavaDoc3.pdf
doc/muJavaDoc3.synctex.gz
doc/muJavaDoc3.tex
.DS_Store
README.md
.project
com/beust/jcommander/MissingCommandException.class
com/beust/jcommander/ParameterDescription.class
com/beust/jcommander/FuzzyMap$IKey.class
com/beust/jcommander/FuzzyMap.class
com/beust/jcommander/Parameterized.class
com/beust/jcommander/IParameterValidator.class
com/beust/jcommander/IVariableArity.class
com/beust/jcommander/Parameter.class
com/beust/jcommander/ResourceBundle.class
com/beust/jcommander/ParametersDelegate.class
com/beust/jcommander/Strings.class
com/beust/jcommander/IStringConverter.class
com/beust/jcommander/JCommander$1.class
com/beust/jcommander/JCommander$DefaultVariableArity.class
com/beust/jcommander/JCommander$ProgramName.class
com/beust/jcommander/JCommander.class
com/beust/jcommander/StringKey.class
com/beust/jcommander/IDefaultProvider.class
com/beust/jcommander/IParameterValidator2.class
com/beust/jcommander/ParameterException.class
com/beust/jcommander/DynamicParameter.class
com/beust/jcommander/IStringConverterFactory.class
com/beust/jcommander/Parameters.class
com/beust/jcommander/IValueValidator.class
com/beust/jcommander/WrappedParameter.class
com/beust/jcommander/converters/CommaParameterSplitter.class
com/beust/jcommander/converters/BaseConverter.class
com/beust/jcommander/converters/IParameterSplitter.class
com/beust/jcommander/converters/LongConverter.class
com/beust/jcommander/converters/FloatConverter.class
com/beust/jcommander/converters/DoubleConverter.class
com/beust/jcommander/converters/ISO8601DateConverter.class
com/beust/jcommander/converters/BooleanConverter.class
com/beust/jcommander/converters/IntegerConverter.class
com/beust/jcommander/converters/BigDecimalConverter.class
com/beust/jcommander/converters/NoConverter.class
com/beust/jcommander/converters/StringConverter.class
com/beust/jcommander/converters/FileConverter.class
com/beust/jcommander/defaultprovider/PropertyFileDefaultProvider.class
com/beust/jcommander/internal/Sets.class
com/beust/jcommander/internal/DefaultConsole.class
com/beust/jcommander/internal/JDK6Console.class
com/beust/jcommander/internal/Console.class
com/beust/jcommander/internal/Maps.class
com/beust/jcommander/internal/Lists.class
com/beust/jcommander/internal/DefaultConverterFactory.class
com/beust/jcommander/internal/Nullable.class
com/beust/jcommander/validators/PositiveInteger.class
com/beust/jcommander/validators/NoValidator.class
com/beust/jcommander/validators/NoValueValidator.class
mujava/TestExecuterCLISingleThread.class
mujava/TraditionalMutantsGeneratorCLI.class
mujava/MutantsGenerator.class
mujava/OpenJavaException.class
mujava/compileTestcase.class
mujava/makeMuJavaStructure.class
mujava/MutationSystem.class
mujava/AllMutantsGenerator.class
mujava/ClassMutantsGenerator.class
mujava/TestExecuter$1.class
mujava/TestExecuter.class
mujava/TestExecuterCLI$1.class
mujava/TestExecuterCLI$2.class
mujava/TestExecuterCLI$3.class
mujava/TestExecuterCLI.class
mujava/TraditionalMutantsGenerator.class
mujava/ExceptionMutantsGenerator.class
mujava/.DS_Store
mujava/cli/runmutesCom.class
mujava/cli/testnew.class
mujava/cli/doRandomGivenPercentMutants.class
mujava/cli/testnewCom.class
mujava/cli/markequiv.class
mujava/cli/runmutes.class
mujava/cli/markequivCom.class
mujava/cli/doRandomGivenMutationOperator.class
mujava/cli/Util.class
mujava/cli/Pair.class
mujava/cli/genmutes.class
mujava/cli/script.class
mujava/cli/genmutesCom.class
mujava/cmd/MutantsGenerator.class
mujava/cmd/TestRunner.class
mujava/gui/ClassMutantsViewerPanel$1.class
mujava/gui/ClassMutantsViewerPanel$2.class
mujava/gui/ClassMutantsViewerPanel.class
mujava/gui/GenMutantsMain$1.class
mujava/gui/GenMutantsMain.class
mujava/gui/CMOTableModel.class
mujava/gui/FileTableModel.class
mujava/gui/MOTableModel.class
mujava/gui/MutantsGenPanel$1.class
mujava/gui/MutantsGenPanel$2.class
mujava/gui/MutantsGenPanel$3.class
mujava/gui/MutantsGenPanel$4.class
mujava/gui/MutantsGenPanel$5.class
mujava/gui/MutantsGenPanel$6.class
mujava/gui/MutantsGenPanel$7.class
mujava/gui/MutantsGenPanel$8.class
mujava/gui/MutantsGenPanel.class
mujava/gui/TMOTableModel.class
mujava/gui/MutantsViewerPanel$1.class
mujava/gui/MutantsViewerPanel$2.class
mujava/gui/MutantsViewerPanel.class
mujava/gui/RunTestMain$1.class
mujava/gui/RunTestMain.class
mujava/gui/TraditionalMutantsViewerPanel$1.class
mujava/gui/TraditionalMutantsViewerPanel$2.class
mujava/gui/TraditionalMutantsViewerPanel$3.class
mujava/gui/TraditionalMutantsViewerPanel.class
mujava/gui/ResultTableModel.class
mujava/gui/RunTestPanel$1.class
mujava/gui/RunTestPanel$2.class
mujava/gui/RunTestPanel$3.class
mujava/gui/RunTestPanel$4.class
mujava/gui/RunTestPanel$5.class
mujava/gui/RunTestPanel.class
mujava/gui/ClassMutantsViewerPanel.java~1~
mujava/gui/GenEMutantsMain.java~1~
mujava/gui/GenEMutantsMain.java~2~
mujava/gui/MutantsGenPanel.java~1~
mujava/gui/RunTestMain.java~1~
mujava/gui/RunTestMain.java~2~
mujava/gui/RunTestPanel.java~1~
mujava/gui/RunTestPanel.java~2~
mujava/gui/TraditionalMutantsViewerPanel.java~1~
mujava/gui/util/SummaryTableModel.class
mujava/gui/util/CMSummaryTableModel.class
mujava/gui/util/TMSummaryTableModel.class
mujava/gui/util/EMSummaryTableModel.class
mujava/op/IOR_Equivalent.class
mujava/op/UOI_Writer.class
mujava/op/OAN.class
mujava/op/ROR_Writer.class
mujava/op/JTI.class
mujava/op/IHD.class
mujava/op/PCD_Writer.class
mujava/op/OMD_Writer.class
mujava/op/PRV_Writer.class
mujava/op/IOR.class
mujava/op/IOP_Helper.class
mujava/op/ISK_JTD_Writer.class
mujava/op/EOA_Writer.class
mujava/op/PNC.class
mujava/op/EAM.class
mujava/op/EMM_Writer.class
mujava/op/PCC.class
mujava/op/LCR.class
mujava/op/AOR_Writer.class
mujava/op/JID.class
mujava/op/OverloadingHelper.class
mujava/op/ParameterTypeInfo.class
mujava/op/PMD.class
mujava/op/IOR_Writer.class
mujava/op/JTI_Writer.class
mujava/op/JID_Writer.class
mujava/op/JSI.class
mujava/op/EOC_Writer.class
mujava/op/IOP_Writer.class
mujava/op/IPC.class
mujava/op/PCD.class
mujava/op/ABS_Writer.class
mujava/op/ABS.class
mujava/op/PPD.class
mujava/op/PPD_Writer.class
mujava/op/EOC.class
mujava/op/UOI.class
mujava/op/JSD_Writer.class
mujava/op/JDC.class
mujava/op/ABS_AOR_LCR_ROR_UOI.class
mujava/op/PCI_Writer.class
mujava/op/AMC.class
mujava/op/IHD_IHI_EqAnalyzer.class
mujava/op/PNC_Writer.class
mujava/op/IHI.class
mujava/op/IOD.class
mujava/op/IOD_Writer.class
mujava/op/PMD_Writer.class
mujava/op/BindInfo.class
mujava/op/PRV.class
mujava/op/ISD.class
mujava/op/IHI_Writer.class
mujava/op/AMC_Writer.class
mujava/op/JSD.class
mujava/op/EAM_Writer.class
mujava/op/IHD_Writer.class
mujava/op/OMR_Writer.class
mujava/op/PCI.class
mujava/op/JSI_Writer.class
mujava/op/ISI_Writer.class
mujava/op/PCC_Writer.class
mujava/op/IPC_Writer.class
mujava/op/EOA.class
mujava/op/OMD.class
mujava/op/JDC_Writer.class
mujava/op/EMM.class
mujava/op/OAN_Writer.class
mujava/op/JTD.class
mujava/op/LCR_Writer.class
mujava/op/IOP.class
mujava/op/OMR.class
mujava/op/.DS_Store
mujava/op/AMC_Writer.java~1~
mujava/op/EAM_Writer.java~1~
mujava/op/EMM_Writer.java~1~
mujava/op/EOA_Writer.java~1~
mujava/op/EOC_Writer.java~1~
mujava/op/IHD_Writer.java~1~
mujava/op/IHI.java2
mujava/op/IHI.java~1~
mujava/op/IHI.java~2~
mujava/op/IHI_Writer.java~1~
mujava/op/IOD_Writer.java~1~
mujava/op/IOD_Writer.java~2~
mujava/op/IOP_Writer.java~1~
mujava/op/IOR.java~1~
mujava/op/IOR_Writer.java~1~
mujava/op/IPC_Writer.java~1~
mujava/op/ISK.java~1~
mujava/op/ISK_JTD_Writer.java~1~
mujava/op/JDC_Writer.java~1~
mujava/op/JDC_Writer.jbx
mujava/op/JID_Writer.java~1~
mujava/op/JID_Writer.java~2~
mujava/op/JSC.java~1~
mujava/op/JSC_Writer.java~1~
mujava/op/JSD_Writer.java~1~
mujava/op/OAN_Writer.java~1~
mujava/op/OMD_Writer.java~1~
mujava/op/OMR_Writer.java~1~
mujava/op/PCI.java~1~
mujava/op/PMD_Writer.java~1~
mujava/op/PNC_Writer.java~1~
mujava/op/PNC_Writer.jbx
mujava/op/PPD_Writer.java~1~
mujava/op/PRV_Writer.java~1~
mujava/op/basic/SDL_Writer.class
mujava/op/basic/VDL.class
mujava/op/basic/CreateDirForEachMethod.class
mujava/op/basic/LOD_Writer.class
mujava/op/basic/ODL.class
mujava/op/basic/AODS_Writer.class
mujava/op/basic/ODL_Writer.class
mujava/op/basic/COD_Writer.class
mujava/op/basic/AOIU.class
mujava/op/basic/CDL.class
mujava/op/basic/SOR.class
mujava/op/basic/LOI_Writer.class
mujava/op/basic/AORS.class
mujava/op/basic/AOIS_Writer.class
mujava/op/basic/ROR_Writer.class
mujava/op/basic/Arithmetic_OP.class
mujava/op/basic/AOIS.class
mujava/op/basic/ASRS.class
mujava/op/basic/COR.class
mujava/op/basic/AODS.class
mujava/op/basic/LOI.class
mujava/op/basic/COI_Writer.class
mujava/op/basic/VDL_Writer.class
mujava/op/basic/ASRS_Writer.class
mujava/op/basic/AODU.class
mujava/op/basic/AORU_Writer.class
mujava/op/basic/AORS_Writer.class
mujava/op/basic/COR_Writer.class
mujava/op/basic/LOD.class
mujava/op/basic/COD.class
mujava/op/basic/AORB.class
mujava/op/basic/AOIU_Writer.class
mujava/op/basic/AORB_Writer.class
mujava/op/basic/MethodLevelMutator.class
mujava/op/basic/CDL_Writer.class
mujava/op/basic/ROR.class
mujava/op/basic/SOR_Writer.class
mujava/op/basic/COI.class
mujava/op/basic/LOR.class
mujava/op/basic/LOR_Writer.class
mujava/op/basic/AORU.class
mujava/op/basic/AODU_Writer.class
mujava/op/basic/SDL.class
mujava/op/basic/AOR.java~1~
mujava/op/exception/ExceptionAnalyzer.class
mujava/op/exception/EHC_Writer.class
mujava/op/exception/ETD.class
mujava/op/exception/EHD_Writer.class
mujava/op/exception/EFD_Writer.class
mujava/op/exception/EHI.class
mujava/op/exception/ETD_Writer.class
mujava/op/exception/EHD.class
mujava/op/exception/ETC_Writer.class
mujava/op/exception/ETC.class
mujava/op/exception/EHC.class
mujava/op/exception/EHI_Writer.class
mujava/op/exception/EFD.class
mujava/op/util/StatementParser.class
mujava/op/util/TraditionalMutantCodeWriter.class
mujava/op/util/MutantCodeWriter.class
mujava/op/util/CodeChangeLog.class
mujava/op/util/ScopeHandlingMutantCodeWriter.class
mujava/op/util/PolymorphicMutator.class
mujava/op/util/LineNumerAnalyzer.class
mujava/op/util/Mutator.class
mujava/op/util/DeclAnalyzer.class
mujava/op/util/TypeCastMutator.class
mujava/openjava/extension/ScopeHandler.class
mujava/openjava/extension/ExtendedClosedEnvironment.class
mujava/openjava/extension/VariableBinder.class
mujava/openjava/extension/EvaluationShuttle.class
mujava/test/NoMutantException.class
mujava/test/OriginalLoader.class
mujava/test/NoMutantDirException.class
mujava/test/TestResultCLI.class
mujava/test/JMutationLoader.class
mujava/test/TestResult.class
mujava/util/InheritanceINFO.class
mujava/util/MutantDirFilter.class
mujava/util/ExtensionFilter.class
mujava/util/Debug.class
mujava/util/DirFileFilter.class

然后选中其中的一个类查看其编译版本

javap -verbose -cp "C:\Libraries\mujava\mujava.jar" "com.beust.jcommander.JCommander" | Select-String "major"

结果如下

major version: 52

可见这个类编译版本是java SE 8

文章来源:https://blog.csdn.net/weixin_44997802/article/details/135388422
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。