2025 update
Press CTRL + SHIFT + P then search and select Java: Create Java Project....
if you do that you will not see the error again, if you open a folder then you will see the error, if you have done files then you have to create the empty java project and transfer the files to the new java project