Skip to main content

Running Kotlin Program With CommanLine - windows

We can write kotlin programs in text editor and run the programs using command line. We need kotlin complier for this . we can download KOTLIN COMPILER FROM HERE . 


2. Unzip Kotlin compiler to program files in c drive
         

3. Copy the path of bin (C:\Program Files\kotlin\bin) and add it your to PATH in System variable.
  

If you do not know how to add path in system variable , you can use the following link

4. Now open notepad and write your kotlin program
fun main(args: Array<String>) {
    println("Hello World")
}
5. save the program as helloworld.kt , i have saved it to my Documents
6. Open cmd 

7. I have saved my helloworld.kt file in Documents folder , so i am changing my directory to Documents  (you have to change it to your directory where the file is saved)
               cd documents
8. Compile the kotlin program using the following command
               kotlinc helloword.kt -include-runtime -d helloworld.jar
9. Run the program using the following command
               java -jar helloworld.jar



Comments

Popular posts

Navigation Component Demo With Quizz Application

This is a simple Application demonstrating the use of android navigation component . Screenshots of the apps are The Navigation components consist of Navigation graph , navHost and NavController Navigation graph is an XML file which contains all the information about destinations(destinations are different fragments) and  paths user can take in the app.  Navigation graph of our app is you can download the full source code of this app from my Github https://github.com/arunkfedex/QuizzDemoNavigation Working video of the Application

Hardware information on Windows 10

 To know hardware information in Winows 10  1. Go to control panel and select System and security    2.click on Administrative tools inside System and Security 3.Click on System information in Administrative tools 4.Now you can see your pc's hardware and software information >>> if you want to know more detailed information about your Processor ,Ram ,motherboard it is better to use 3rd party applications like  CPU-Z .  Download   CPUZ   . 

DataBinding - ViewBinding in Android

ViewBinding is a feature that allow you to write code more easily.  First we will s ee an App without ViewBinding then we will enable ViewBinding in the App .Screenshot of our app is , it is asimple application when we  click the Button score Will Increase You can also see this tutorial in my youtube channel you can download source code of this project from GitHub https://github.com/arunkfedex/DemoNavGraphTest Layout file is activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <TextView android:id="@+id/text1...