When you go to work, you will find that there are rules on how people want reports formatted and what templates to use and how to develop software, etc.
Would a java extension mean that it is Java as opposed to what you did?
How would she be able to load/test your program?
I would go to the professor’s office (or virtually) and explain that you did work, but were unaware that you were supposed to use that extension so could she please let you know where that was specified in the assignment because you did not see that and wanted to make sure you understood how to do it in the future. Approach it as you want to learn not that she is incompetent.
Or if your issue was that you were not using java at all, make sure you understand the assignment. So if the assignment was to make a java program and you made a C++ program, then you may have gotten the assignment wrong.
Or is it that this is understood by people that this is the norm…like you put a .docx on a Microsoft Word file even though maybe you COULD have a different extension and then open it with MS Word and it would be okay.
If she says she said it, then ask what class it was in. Then if there is a video of that class review it. If not, contact someone in the class and ask how they figured out what to do.
After (and only after) you do ALL of this, and you really think that you are within the norm and she really didn’t specify then talk to the Department Head and ask how to approach this.
Also decide how much this assignment is worth…if a HW maybe live and learn but if a major assignment put more effort.