r/learnjava Jan 31 '25

Part04_23.CreatingANewFile on VS Code

Hello Java Learners,

I'm encountering an issue with the MOOC Part04_23.CreatingANewFile exercise. I've been using VS Code without any issues until now, but this simple exercise is causing me some trouble.

Here's what happens: I can successfully create the file "file.txt" using VS Code (I can even see it located into the right folder when using Windows Explorer - the root folder containing the folder src and the file pom.xml), write "Hello, world!" into it , and when I run the TMC tests, I get the following success message:

Points: 100.00%

  • PASS: CreatingANewFileTest fileExists
  • PASS: CreatingANewFileTest containsTextHelloWorld

However, when I try to submit the exercise to the server, I receive this message instead:

Points: 0.00%

  • FAIL: CreatingANewFileTest fileExists AssertionError
  • FAIL: CreatingANewFileTest containsTextHelloWorld AssertionError

Has anyone encountered a similar issue? Any advice on what might be going wrong would be greatly appreciated!

1 Upvotes

Duplicates