Java Code - Run a class before the main

Job ID: 32897793

Budget: €8 – €30 EUR

The program is ready, the whole code is there and working but we need one class to run before the one in main. The class we want to run first it creates an excel file which is needed by the code in main. So know we get an error "file doesnt exist".
I clarify that we have all the code needed, all we need is to run a class before the code in main.