# Pass jvm-target option to Kotlin JSR223 Script Engine

**URL:** <https://discuss.kotlinlang.org/t/pass-jvm-target-option-to-kotlin-jsr223-script-engine/23126>\
**Category:** Support\
**Created:** [October 5, 2021, 8:49pm UTC](https://discuss.kotlinlang.org/t/pass-jvm-target-option-to-kotlin-jsr223-script-engine/23126 "2021-10-05T20:49:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toivo](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@Toivo](https://discuss.kotlinlang.org/u/Toivo)\
**Post date:** [October 5, 2021, 8:49pm UTC](https://discuss.kotlinlang.org/t/pass-jvm-target-option-to-kotlin-jsr223-script-engine/23126/1 "2021-10-05T20:49:29Z")

</div>

Hi. Could anyone please suggest a way to specify compiler option while calling script evaluation via JSR223?

```auto
val engine = ScriptEngineManager().getEngineByExtension("kts")!!
result = engine.eval(source) as Result

```

The reason behind my question: in a project I use Java 11 ubiquitously, so this code gives me following ScriptException currently: “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”.

Dependency used: kotlin-scripting-jsr223, version 1.4.32
