The JDK installation comes with the command java that is responsible for running a java program. Some important point that need to be kept in mind when running a Java program are :
- JDK comes bundled with a compiler command named javac . In order to compile a java program named WelcomeToJava.java , we run the command
javac WelcomeToJava.java
This run generates the java bytecode file named WelcomeToJava.class. There many javac command option that can be specified while running the javac command, but they are not covered in the exam. In order to view those options one needs to type the following command :
javac -help
- The compilation of .java file generates .class file. In order to execute this compiled bytecode file , there is another executable file in JDK named java. The syntax to execute the java command is as follows :
java WelcomeToJava
There no need to append…
View original post 80 more words