How could I compile Kotlin, without compiler?

I am making an IDE for Kotlin as a learning project, and I am at the point where I can have it save, and load files, I just need it to compile files. How could I compile the files if the user didn’t have the kotlin compiler already ready to go on their computer?

I’m a bit worried you’ve set yourself up for more than you realise. However you may be able to use gradle/maven to download the compiler. If it is just a learning project just requiring gradle for building may be the easiest. It has an embedding system so you can actually embed gradle and get additional information on the project for free.

Maybe you can have a look at the online compiler on the official site?

1 Like

Thanks for helping, but I think I found a way I could do this, I just use a path to get to the compiler instead of just saying kotlinc. I found that if you have a problem in Kotlin, it is better to search for the answer on Java forums, and java related things XD.

Well that depends on your problem. If your problem is related to the language, than you wont have any chance to find your answer looking at java forums. If your problem is related to understanding systems/libraries there will be obviously more information in java forums as java is the much older and more widely used language :wink: