question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

class file for java.lang.invoke.MethodType not found

See original GitHub issue

I tried to setup new sample project and it can’t compile.

An exception has occurred in the compiler (1.8.0_05). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.invoke.MethodType not found
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJava'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) 
.
.
.
Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.
    at org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler.execute(Jdk6JavaCompiler.java:47)
    at org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler.execute(Jdk6JavaCompiler.java:38)
    at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:96)
    at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:49)
    at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:35)
    at org.gradle.api.internal.tasks.compile.DelegatingJavaCompiler.execute(DelegatingJavaCompiler.java:29)
    at org.gradle.api.internal.tasks.compile.DelegatingJavaCompiler.execute(DelegatingJavaCompiler.java:20)
    at org.gradle.api.internal.tasks.compile.IncrementalJavaCompilerSupport.execute(IncrementalJavaCompilerSupport.java:33)
    at org.gradle.api.internal.tasks.compile.IncrementalJavaCompilerSupport.execute(IncrementalJavaCompilerSupport.java:24)
    at org.gradle.api.tasks.compile.Compile.compile(Compile.java:67)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 72 more

Setup is similar as in the doc except:

retrolambda {
    jdk System.getenv("JAVA8_HOME")
    oldJdk System.getenv("JAVA7_HOME")
    javaVersion JavaVersion.VERSION_1_7
}

Environment variables are set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home respectively.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
vipheyuecommented, Jun 28, 2016

i delete this retrolambda { jdk System.getenv(“JAVA8_HOME”) oldJdk System.getenv(“JAVA6_HOME”) javaVersion JavaVersion.VERSION_1_6 jvmArgs ‘-arg1’, ‘-arg2’ defaultMethods false incremental true }

then OK!!

0reactions
chakritcommented, Apr 4, 2016

@hanibalsk what is the “old way interface” you mention? I’m using a lot of the Callable thing and now my code breaks with the exact same error : (

Read more comments on GitHub >

github_iconTop Results From Across the Web

Didn't find class "java.lang.invoke.MethodType" - Stack Overflow
Resolved as follows by following the tip in the comments. I have a class to instantiate the application: public class MyApplicationInstance ...
Read more >
Android studio# jdk8# class file for Java.lang.invoke.MethodType ...
I tried to setup new sample project and it can ' t compile. An exception have occurred in the compiler (1.8.0_05). Please file...
Read more >
MethodType (Java Platform SE 8 ) - Class - Oracle Help Center
java.lang.invoke.MethodType ... Finds or creates a method type with additional parameter types. ... The resulting method has no parameter types.
Read more >
java 1.8 and retrolambda support - Google Groups
Symbol$CompletionFailure : class file for java.lang.invoke.MethodType not found. 2) add retrolambda-2.0.1.jar to the buck-libs folder and got error:.
Read more >
Visible to Public - Issue Tracker - Google
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.invoke.MethodType not found. A sample project to demonstrate the problem can be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found