# getting-started

Zhiqiang Bian

10/21/2021, 6:46 PM
Just asking a silly question for a friend of my friend think smart. Is there a plugin to convert a Kotlin module into Java module that can run without issues? The
function of Android Studio can generate Java files. But they have a lot of IDE highlights and imports from
package, which does not seem to work.


10/21/2021, 6:47 PM
But why does the friend of your friend want to do that ? 😁


10/21/2021, 6:51 PM
Not really, no. The Kotlin compiler can generate JVM bytecode that cannot be directly represented in Java. Sure you can rewrite those parts to valid (even idiomatic) Java (as in, different code that accomplishes the same task), but there's a limit to which that can be done automatically, as it requires understanding intent instead of process.

Zhiqiang Bian

10/21/2021, 6:53 PM
The excuse I heard is that s/he is working on a part-time job, so s/he does not want to learn Kotlin . Please tell me the task is impossible 🙏.
@Ruckus Thank you, Sir. You just freed me from Mission Impossible 🙏.


10/21/2021, 7:51 PM
there is a plugin for intellij that will show you the expected java-code from some kotlin-code. But it doesn't replace calls to the kotlin stdlib w/ calls to the java stdlib. So event if you wanted to run that java code, you'll still need the kotlin run-time.