Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Such Method #951

Open
Metincloup opened this issue Jul 14, 2023 · 0 comments
Open

No Such Method #951

Metincloup opened this issue Jul 14, 2023 · 0 comments
Labels

Comments

@Metincloup
Copy link

When i try to compile i am getting no such method error

it only worked in print "hello world!" example

i am getting different errors when i use different java versions but all of them no such method

i used zetcode snake example and other things

here are the logs and cmd

"C:\Program Files\Java\jre-1.8\bin\java.exe" -jar bytecoder-cli-2023-05-19-executable.jar compile js -classpath=. -mainclass=com.zetcode.Snake -builddirectory=.

Tem 14, 2023 10:00:42 PM de.mirkosertic.bytecoder.core.Slf4JLogger info
INFO: Compiling main class com.zetcode.Snake to directory .
Current Analysis Stack is :
Resolving type Lcom/zetcode/Snake;
Resolving type Ljavax/swing/JFrame;
Resolving type Ljava/awt/Frame;
Resolving type Ljava/awt/Window;
Resolving type Ljava/awt/Container;
Parsing method body of Ljava/awt/Component;.
Parsing method body of Ljava/awt/Toolkit;.
Parsing method body of Ljava/awt/GraphicsEnvironment;.isHeadless
Parsing method body of Ljava/awt/GraphicsEnvironment;.getHeadlessProperty
Parsing method body of Ljava/awt/GraphicsEnvironment;.lambda$getHeadlessProperty$0
Visiting #0 LDC Stack size is 0 Source line -1
Visiting #1 INVOKESTATIC Stack size is 1 Source line -1
Stack 0 of type Ljava/lang/String;
Visiting #2 ASTORE Stack size is 1 Source line -1
Stack 0 of type Ljava/lang/String;
Visiting #3 ALOAD Stack size is 0 Source line -1
Local 0 of type Ljava/lang/String;
Visiting #4 IFNONNULL Stack size is 1 Source line -1
Local 0 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/String;
Visiting #5 LDC Stack size is 0 Source line -1
Local 0 of type Ljava/lang/String;
Visiting #6 INVOKESTATIC Stack size is 1 Source line -1
Local 0 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/String;
Visiting #7 IFNULL Stack size is 1 Source line -1
Local 0 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/String;
Visiting #8 GETSTATIC Stack size is 0 Source line -1
Local 0 of type Ljava/lang/String;
Visiting #9 DUP Stack size is 1 Source line -1
Local 0 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/Boolean;
Visiting #10 PUTSTATIC Stack size is 2 Source line -1
Local 0 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/Boolean;
Stack 1 of type Ljava/lang/Boolean;
Visiting #11 PUTSTATIC Stack size is 1 Source line -1
Local 0 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/Boolean;
Visiting #12 GOTO Stack size is 0 Source line -1
Local 0 of type Ljava/lang/String;
Check of stack size is ok
Visiting #92 ACONST_NULL Stack size is 0 Source line -1
Local 0 of type Ljava/lang/String;
Visiting #93 ARETURN Stack size is 1 Source line -1
Local 0 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/Object;
Check of stack size is ok
Visiting #15 LDC Stack size is 0 Source line -1
Local 0 of type Ljava/lang/String;
Visiting #16 INVOKESTATIC Stack size is 1 Source line -1
Local 0 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/String;
Visiting #17 ASTORE Stack size is 1 Source line -1
Local 0 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/String;
Visiting #18 ALOAD Stack size is 0 Source line -1
Local 0 of type Ljava/lang/String;
Local 1 of type Ljava/lang/String;
Visiting #19 LDC Stack size is 1 Source line -1
Local 0 of type Ljava/lang/String;
Local 1 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/String;
Visiting #20 INVOKEVIRTUAL Stack size is 2 Source line -1
Local 0 of type Ljava/lang/String;
Local 1 of type Ljava/lang/String;
Stack 0 of type Ljava/lang/String;
Stack 1 of type Ljava/lang/String;
de.mirkosertic.bytecoder.core.ir.AnalysisException: java.lang.IllegalStateException: No such method : java/lang/String.contains(Ljava/lang/CharSequence;)Z
at de.mirkosertic.bytecoder.core.ir.ResolvedMethod.parseBody(ResolvedMethod.java:50)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethodInternal(ResolvedClass.java:134)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethod(ResolvedClass.java:110)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parseInvokeDynamicInsnNode(GraphParser.java:2418)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:2668)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:407)
at de.mirkosertic.bytecoder.core.parser.GraphParser.(GraphParser.java:152)
at de.mirkosertic.bytecoder.core.ir.ResolvedMethod.parseBody(ResolvedMethod.java:45)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethodInternal(ResolvedClass.java:134)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethod(ResolvedClass.java:110)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse_INVOKESTATIC(GraphParser.java:839)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parseMethodInsNode(GraphParser.java:885)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:2646)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:407)
at de.mirkosertic.bytecoder.core.parser.GraphParser.(GraphParser.java:152)
at de.mirkosertic.bytecoder.core.ir.ResolvedMethod.parseBody(ResolvedMethod.java:45)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethodInternal(ResolvedClass.java:134)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethod(ResolvedClass.java:110)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse_INVOKESTATIC(GraphParser.java:839)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parseMethodInsNode(GraphParser.java:885)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:2646)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:407)
at de.mirkosertic.bytecoder.core.parser.GraphParser.(GraphParser.java:152)
at de.mirkosertic.bytecoder.core.ir.ResolvedMethod.parseBody(ResolvedMethod.java:45)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethodInternal(ResolvedClass.java:134)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethod(ResolvedClass.java:110)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.requestInitialization(ResolvedClass.java:98)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.resolveClass(CompileUnit.java:137)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse_INVOKESTATIC(GraphParser.java:812)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parseMethodInsNode(GraphParser.java:885)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:2646)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:407)
at de.mirkosertic.bytecoder.core.parser.GraphParser.(GraphParser.java:152)
at de.mirkosertic.bytecoder.core.ir.ResolvedMethod.parseBody(ResolvedMethod.java:45)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethodInternal(ResolvedClass.java:134)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethod(ResolvedClass.java:110)
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.requestInitialization(ResolvedClass.java:98)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.resolveClass(CompileUnit.java:137)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.loadClass(CompileUnit.java:146)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.resolveClass(CompileUnit.java:116)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.loadClass(CompileUnit.java:146)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.resolveClass(CompileUnit.java:116)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.loadClass(CompileUnit.java:146)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.resolveClass(CompileUnit.java:116)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.loadClass(CompileUnit.java:146)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.resolveClass(CompileUnit.java:116)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.loadClass(CompileUnit.java:146)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.resolveClass(CompileUnit.java:116)
at de.mirkosertic.bytecoder.core.parser.CompileUnit.resolveMainMethod(CompileUnit.java:212)
at de.mirkosertic.bytecoder.cli.CompileJSCommand.call(CompileJSCommand.java:84)
at de.mirkosertic.bytecoder.cli.CompileJSCommand.call(CompileJSCommand.java:41)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at de.mirkosertic.bytecoder.cli.BytecoderCLI.main(BytecoderCLI.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
Caused by: java.lang.IllegalStateException: No such method : java/lang/String.contains(Ljava/lang/CharSequence;)Z
at de.mirkosertic.bytecoder.core.ir.ResolvedClass.resolveMethod(ResolvedClass.java:112)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse_INVOKEVIRTUAL(GraphParser.java:705)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parseMethodInsNode(GraphParser.java:881)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:2646)
at de.mirkosertic.bytecoder.core.parser.GraphParser.parse(GraphParser.java:407)
at de.mirkosertic.bytecoder.core.parser.GraphParser.(GraphParser.java:152)
at de.mirkosertic.bytecoder.core.ir.ResolvedMethod.parseBody(ResolvedMethod.java:45)
... 67 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants