Java project relative and absolute paths to access files.

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

Figuratively, add a picture access to a folder, if you write the full path of the pictures when accessing the picture, like "C: \ Users \ dell \ Desktop \ hobby \ 3dddbc48w5527w11e9w9716wfa163e4c4e74.jpg", which is the full path of the pictures is written dead.
If you just write the name of the picture, or did not write the disk where the picture, this image will default to access the project is located in the path, relative path is relative to the project in terms of the path.

Guess you like

Origin blog.csdn.net/weixin_40358672/article/details/92795895