Skip to content

for JVM target 1.8 #190

Closed
Closed
@mskimorg

Description

@mskimorg

My existing Scala Spark (using sbt) project which compiled with -source 1.8 -target 1.8 shows

Kotlin: Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option

Should I rebuild this project with 8 (which replaces 11 below)

const val jvmTarget = "11"


I tried:

libraryDependencies ++= Seq(
  "org.jetbrains.kotlin" % "kotlin-stdlib" % "1.7.22",
  "org.jetbrains.kotlinx.spark" % "kotlin-spark-api_3.1.2_2.12" % "1.2.2"
)

and the kotlin code was

fun main() {
    println("hello")
    withSpark {
        dsOf(1, 2, 3).show()
    }
}

.

without withSpark block, it works and shows

hello

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions