79254342

Date: 2024-12-05 10:55:56
Score: 1
Natty:
Report link

If you want to use relative path and you has used SpringBoot,you should do:

URL resource=this.getClass().getClassLoader().getResource("test.txt");
File file = new File(resource.getPath());
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ChrisPeng