What kind of java libraries can or can't be used with kotlin-javascript


I want to use some java libraries with kotlin-javascript. I haven't try, and I have a question: Is there any limitaton to use java libraries with kotlin-javascript? What kind of java libraries can be used, and what can't?

If I use a big 3rd-party java library, will it generate huge javascript code?


You can not use Java libraries in JS projects.


That's a bad news. Some libraries I familiar with can't be used, e.g. commons-lang

Will kotlin-javascript support it in the future?


We will support it as soon as JavaScript supports running Java byte codes, but no sooner than that :)




Someone needs to write a .class -> asm.js compiler...


There are interesting project TeamVM. And they have Kotlin example: https://github.com/konsoletyper/teavm/tree/master/teavm-samples/teavm-samples-kotlin

I testing that features and it can compile jvm byte code such as Kotlin+Java to js code and it work’s. It use maven for building js sources. And i saw gradle plugin, but not testing that: https://github.com/edibleday/teavm-gradle-plugin.

The problem I can’t to resolve with TeaVM is debugging in browser. It create source maps, but I don’t understand how it work’s :(. Intellij IDEA debbuger start’s debugging with Chrome browser and breakpoint work’s, but there are no relevant information in variable view. I am very interesting with Jetbrain product and hope that someone can start debugging with TeamVM.