1

I have the following workspace directory structure :

enter image description here

And I thought that I could refer to the text file just using relative paths :

"src/main/resources/test/binary_Message.txt"

But this is not registering for some reason.

Caffeinated
  • 11,134
  • 39
  • 115
  • 205

1 Answers1

2

getClass().getResource("/config/test/binary_Message.txt");

Btw, it would make more sense to put the file under src/test/resources if it is really meant for testing only.

Ville Oikarinen
  • 370
  • 1
  • 11