Skip to content

INTERNAL_ERROR - Fatal Error: Unable to find package java.lang in classpath or bootclasspath #3

@ValdZX

Description

@ValdZX

plugins {
kotlin("jvm") version "1.3.41"
kotlin("kapt") version "1.3.41"
}

allprojects {
repositories {
...
maven(url = "https://jitpack.io")
}
}

dependencies {
kapt("com.google.auto.service:auto-service:1.0-rc6")
implementation(kotlin("stdlib-jdk8"))
testImplementation("org.junit.jupiter:junit-jupiter-api:5.1.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.1.0")
testImplementation("com.github.tschuchortdev:kotlin-compile-testing:1.1.2")
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.4.0")
testImplementation(files(Jvm.current().toolsJar))
}

exception: java.lang.IllegalStateException: failed to analyze: com.sun.tools.javac.util.FatalError: Fatal Error: Unable to find package java.lang in classpath or bootclasspath
at org.jetbrains.kotlin.analyzer.AnalysisResult.throwIfError(AnalysisResult.kt:56)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyzeAndGenerate(KotlinToJVMBytecodeCompiler.kt:361)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileBunchOfSources(KotlinToJVMBytecodeCompiler.kt:258)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:205)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:57)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:96)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:52)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:93)
at com.tschuchort.compiletesting.KotlinCompilation.stubsAndApt(KotlinCompilation.kt:493)
at com.tschuchort.compiletesting.KotlinCompilation.compile(KotlinCompilation.kt:674)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions