How to compile a java file using javac

javac command is used to compile a java file. You can directly run javac in command prompt if environment variable is set properly, and best way to check it by executing javac command.
If system cannot find javac then you have to set environment variable for javac.

How to compile a java file using javac command.

Example:
c:\jdk\appdemo> javac Testfile.java
Program Output:
Testfile.java compile successfully.

Editing, compiling and executing java



                                                                      ⏪ PREVIOUS PAGE          NEXT PAGE ⏩

No comments:

Post a Comment