Introduction to tools for Java programming

Java programs compilation

We’ve started with showing 2 base tools for working with Java programs:

  • javac which can be used to compile classes
  • java which can be used to run compiled classes on Java Virtual Machine (JVM)

We created sample Java HelloWorld.java program with main method

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello world");
    }
}

which could be compiled with

javac HelloWorld.java

which produces HelloWorld.class file for JVM. We executed this bytecode file with

java HelloWorld

where we specified the name of the class to run.

IDE for working with projects

I encouraged you to download and use the Intellij IDEA that can be found here.

If you want to try some other alternatives, let’s take a look at the Visual Studio Code that can be downloaded from here or let’s try Eclipse IDE that is available here. In case of Visual Studio Code you’ll have to download some extensions packs to have support for Java language.

Future tasks

We’re going to try working with project template. I created Java project template for you that can be found here.

Previous
Next