https://kotlinlang.org logo
#announcements
Title
# announcements
i

Ifvwm

07/04/2019, 6:46 AM
how I can pass my kotlin code to someone's java project?
r

ribesg

07/04/2019, 6:50 AM
You could convert it to Java, or compile it as a library, or add support for Kotlin compilation to the java project
i

Ifvwm

07/04/2019, 6:51 AM
how to compile it as a library? or add compilation ?
u

Uriel Salischiker

07/04/2019, 6:56 AM
add support for kotlin compilation -> You add the kotlin dependencies
compile it as a library -> You create a normal jar like you would do to distribute anything and pass it to them so they can add it as a dependency
please give me a link, I google that and nothing is help
like pack kotlin code to a jar file and import that file in java?
n

nfrankel

07/04/2019, 10:24 AM
You could use a build tool like maven Create a jar from the Kotlin sources And distribute it
i

Ifvwm

07/05/2019, 5:22 AM
yeah, I did that, pack kotlin into a jar, and it crashs in java to use that jar
n

nfrankel

07/05/2019, 8:11 AM
Stacktrace perhaps?
2 Views