Java commands

In the latest chapter of the course I’m currently taking, we have discussed the environment for Java. I was taught that in order to run a java application, one needs two things. A JDK aka. a Java Development Kit and a JRE, in other words, Java Runtime Environment.

The JDK includes all the commands, that I will discuss below, but before I jump right into it, it is worth discussing that Java became a popular language thanks to its independece from operating system, which is made possible as java source code gets translated into byte code, and the JRE runs it.

Now that I have created this ridiculous introduction for our topic, let’s look through the four most important java commands.

  1. javac
    • javac is responsible for converting .java source code into .class byte code making Java a versatile tool that can be run on any system.
    • it is included in the JDK
  2. java
    • java is the command that will actually run the byte code that running javac has produced. It executes the program
  3. jar
    • jar is the command that packages files together. It works similarly to zip.
  4. javadoc
    • javadoc is used for generating HTML-formatted documentation