Eclipse Error: java.lang.CharSequence cannot be resolved

前端 未结 2 494
耶瑟儿~
耶瑟儿~ 2021-02-08 11:19

I\'m getting a error trying to compile a simple code in Eclipse. I\'m using jre8.

For example, when I try to compile this code:

import java.util.ArrayLis         


        
2条回答
  •  清歌不尽
    2021-02-08 12:20

    This is because the BytecodeParser class in soot.JastAddJ doesn't support higher version of java class file format.The CONSTANT_MethodHandle,CONSTANT_MethodType and CONSTANT_InvokeDynamic of constant pool type missed.Below is my solution to fix the question:

    (1) add the type int soot.JastAddJ.BytecodeParser:

    private static final int CONSTANT_MethodHandle=15;
    private static final int CONSTANT_MethodType=16;
    private static final int CONSTANT_InvokeDynamic=18;
    

    (2) add 3 classes to support the parse:

    in the method parseEntry of soot.JastAddJ.BytecodeParser,add

    CONSTANT_MethodHandle_Info, CONSTANT_MethodType_Info, CONSTANT_InvokeDynamic_Info

    in the switch case block.

    Now,soot can run successfully.

提交回复
热议问题