IT Band of Brothers Grammar Java compiler Java program

After a good source program written in Java, then you should compile the Java source file to generate bytecode files.

Compile Java programs need to use the JDK javac command provided, as it has been to add the path to where javac command Path environment variable system, it can now be used directly javac command to compile a Java program.

Use Windows + R key to open the "Run" and then enter cmd click "OK" from the console 34 as shown in FIG.

17624434-c82e6a4ee895c5ca.png

34 through the "Run" into the console

Use the cd command in the console to enter the directory where the HelloWorld.java: C: \ java. 35 shown in FIG.

17624434-4c263160d512c82b.png

35 entered in the console directory HelloWorld.java

36, using the javac over HelloWorld.java source file.

17624434-e9fee5cfd858d8f8.png

36 compiled HelloWorld.java

After successfully compiled byte code file generated in the HelloWorld.class HelloWorld.java same directory, shown in Figure 37.

17624434-5ab4ad20b38a5b39.png

FIG 37 generates byte code files

Guess you like

Origin blog.csdn.net/ITXDL123/article/details/93252295