Let us save the above Java code as CreateWorkBook.java, and then compile and execute it from the command prompt as follows:

$javac CreateWorkBook.java
$java CreateWorkBook

If your system environment is configured with the POI library, it will compile and execute to generate the blank Excel file named createworkbook.xlsx in your current directory and display the following output in the command prompt.