# Call FontAwesomeFX from Kotlin

**URL:** <https://discuss.kotlinlang.org/t/call-fontawesomefx-from-kotlin/13368>\
**Category:** Uncategorized\
**Created:** [July 4, 2019, 5:23pm UTC](https://discuss.kotlinlang.org/t/call-fontawesomefx-from-kotlin/13368 "2019-07-04T17:23:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fedorov1984](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@fedorov1984](https://discuss.kotlinlang.org/u/fedorov1984)\
**Post date:** [July 4, 2019, 5:23pm UTC](https://discuss.kotlinlang.org/t/call-fontawesomefx-from-kotlin/13368/1 "2019-07-04T17:23:43Z")

</div>

I have a kotlin app that uses tornadoFX(via maven). I would like to use FontAwesomeFX library to get icons but this library is compiled with newer JDK than kotlin uses. I tried to set target jvm level in kotlin maven plugin to different versions but I am still getting

Exception in thread “main” java.lang.UnsupportedClassVersionError: de/jensd/fx/glyphs/fontawesome/demo/FontAwesomeIconsDemoAppKt has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Is there a way to fix this issue?

---

<div class="post-metadata">

**Author:** ![darksnake](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/darksnake/32/2479_2.png) [@darksnake](https://discuss.kotlinlang.org/u/darksnake)\
**Post date:** [July 4, 2019, 6:43pm UTC](https://discuss.kotlinlang.org/t/call-fontawesomefx-from-kotlin/13368/2 "2019-07-04T18:43:35Z")

</div>

You are confusing runtime version with compilation version. You can just use newer JDK to compile project. Be warned though that tornadofx uses some nasty hacks not allowed in JDK 9+, so some things could stop working. We are all waiting for proper Java 11 release.

---

<div class="post-metadata">

**Author:** ![fedorov1984](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@fedorov1984](https://discuss.kotlinlang.org/u/fedorov1984)\
**Post date:** [July 4, 2019, 7:17pm UTC](https://discuss.kotlinlang.org/t/call-fontawesomefx-from-kotlin/13368/3 "2019-07-04T19:17:34Z")

</div>

What is the proper way to do it in maven with kotlin? do I need to add maven compiler plugin?

---

<div class="post-metadata">

**Author:** ![darksnake](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/darksnake/32/2479_2.png) [@darksnake](https://discuss.kotlinlang.org/u/darksnake)\
**Post date:** [July 5, 2019, 6:40am UTC](https://discuss.kotlinlang.org/t/call-fontawesomefx-from-kotlin/13368/4 "2019-07-05T06:40:53Z")

</div>

Did not work with maven for a long time. It is not build config, it is JDK version it runs on top of it. If you have only JDK 8 in your machine, you can’t use it to work with Java 9 class files (version 53). So you need to install additional JDK and use it for the project.
