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,982
  • 40
  • 122
  • 216

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
  • 400
  • 1
  • 11