gpt4 book ai didi

java - 如何使用Soot处理java源代码

转载 作者:行者123 更新时间:2023-11-30 07:58:35 48 4
gpt4 key购买 nike

我使用以下命令来处理java文件

   -src-prec java  -cp "/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jce.jar" -process-dir "/Users/.../test/src" -f jimple

处理java源码时出错,如何解决?

java.lang.ClassCastException: soot.JastAddJ.CONSTANT_Utf8_Info cannot be cast to soot.JastAddJ.CONSTANT_Class_Info
at soot.JastAddJ.BytecodeParser.parseThisClass(BytecodeParser.java:437)
at soot.JastAddJ.BytecodeParser.parseTypeDecl(BytecodeParser.java:404)
at soot.JastAddJ.BytecodeParser.parse(BytecodeParser.java:331)
at soot.JastAddJ.BytecodeParser.parse(BytecodeParser.java:301)
at soot.JastAddJ.Attributes$TypeAttributes.innerClasses(Attributes.java:412)
at soot.JastAddJ.Attributes$TypeAttributes.processAttribute(Attributes.java:316)
at soot.JastAddJ.Attributes.attributes(Attributes.java:61)
at soot.JastAddJ.Attributes$TypeAttributes.<init>(Attributes.java:307)
at soot.JastAddJ.BytecodeParser.parse(BytecodeParser.java:337)
at soot.JastAddJ.BytecodeParser.read(BytecodeParser.java:27)
at soot.JastAddJ.PathPart.getCompilationUnit(PathPart.java:115)
at soot.JastAddJ.Program.getCompilationUnit(Program.java:887)
at soot.JastAddJ.Program.getLibCompilationUnit_compute(Program.java:1531)
at soot.JastAddJ.Program.getLibCompilationUnit(Program.java:1514)
at soot.JastAddJ.Program.lookupLibType_compute(Program.java:1479)
at soot.JastAddJ.Program.lookupLibType(Program.java:1447)
at soot.JastAddJ.Program.lookupType_compute(Program.java:1426)
at soot.JastAddJ.Program.lookupType(Program.java:1407)
at soot.JastAddJ.Program.Define_TypeDecl_lookupType(Program.java:1995)
at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1657)
at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1657)
at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1657)
at soot.JastAddJ.ASTNode.Define_TypeDecl_lookupType(ASTNode.java:1657)
at soot.JastAddJ.Expr.lookupType(Expr.java:1186)
at soot.JastAddJ.TypeAccess.decls_compute(TypeAccess.java:425)
at soot.JastAddJ.TypeAccess.decls(TypeAccess.java:414)

错误信息如上所示

最佳答案

这是一个错误,您应该将其报告给烟灰问题跟踪器,并提供有关如何重现该问题的详细信息。

关于java - 如何使用Soot处理java源代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32272001/

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