Dron Bhattacharya
02/16/2023, 10:12 AMSam
02/16/2023, 10:19 AMkotlinc
directly, despite being a Kotlin programmer for years…Robert Jaros
02/16/2023, 10:22 AMDron Bhattacharya
02/16/2023, 10:22 AMSam
02/16/2023, 10:23 AMDron Bhattacharya
02/16/2023, 10:25 AMSam
02/16/2023, 10:26 AMGoetz Markgraf
02/16/2023, 10:28 AMgradle init
. Then grab your favorite editor and start coding.
Personally, I side with @Sam and think that an IDE is a great help even for a small mini-program.
About the “executable”: In a JVM-Environment, you don’t create Executables in the sense of a binary that can be called from the shell directly. The nearest to that is a fatJar, meaning a JAR-File that contains every depedency and library. You can then call this with java -jar <name of jar-file>.jar
.Adam S
02/16/2023, 10:29 AMDron Bhattacharya
02/16/2023, 10:30 AMAdam S
02/16/2023, 10:31 AMDron Bhattacharya
02/16/2023, 10:33 AM.exe
format of Windows. Is it possible with Kotlin?Goetz Markgraf
02/16/2023, 10:34 AMSam
02/16/2023, 10:34 AM.bat
script. You might need an extra plugin to package that up into an .exe
but it’s definitely possibleAdam S
02/16/2023, 10:37 AM.kexe
on Mac/Linux for some reason). For Kotlin/Native most of the docs don’t use Gradle or IntelliJ, just the command line. https://kotlinlang.org/docs/native-command-line-compiler.html.
On Kotlin/JVM, there’s not really a thing as an .exe
. Java programs just aren’t like that, instead they’re packaged into .jar
files, and you have to run them using java -jar test.jar
(There is GraalVM, but that’s quite advanced.)Goetz Markgraf
02/16/2023, 10:40 AM,kexe
ending is only added on linux and macos. On windows its a .exe
.File
class in Kotlin/native.Dron Bhattacharya
02/16/2023, 11:08 AM.txt
files, pdf
files on the desktop and soon the desktop becomes a mess. (Windows OS)
Goal: I want to write some code to keep my Desktop clean and uncluttered. The program basically detects the files and puts them in the right places and deletes unnecessary files according to the configuration I made in the code. The program runs periodically in the background to do these jobs. So, I need to create a .exe
and then schedule it as done in Windows.
Is, Kotlin the right choice for these things?
I love programming and in my spare time, I am always coding something and sharing it with friends. So can Kotlin be used for this kind of general-purpose programming???Goetz Markgraf
02/16/2023, 11:10 AM.exe
-File because the Windows Scheduling can surely also run .bat
-Files.
I recommend using “normal” Kotlin (meaning Kotlin/jvm), what most of documentation is using. You can package your program however you want and create a .bat
-File to run it.Dron Bhattacharya
02/16/2023, 11:16 AMLaertes Moustakas
02/16/2023, 11:35 AMGoetz Markgraf
02/16/2023, 12:02 PMRobert Jaros
02/16/2023, 12:20 PMKirill Grouchnikov
02/16/2023, 1:33 PMCasey Brooks
02/16/2023, 2:23 PMDron Bhattacharya
02/17/2023, 6:28 PMbuilding
I don't know why. But it seems pretty important though.
I have done the Kotlin sample project from Gradle Docs.Casey Brooks
02/17/2023, 6:36 PMJacob
02/17/2023, 6:39 PMDron Bhattacharya
02/17/2023, 6:40 PMKlitos Kyriacou
02/20/2023, 9:39 AM