Several ways to read pictures of project files in eclipse

Source: Internet
Author: User

There are two ways of reading a picture:

Absolute path method and relative path method

1, Absolute path method: You need to complete the path of the picture to write to the Web page, otherwise you will get the picture is unsuccessful.

For example: Save the picture to the F drive (super picture)

The path should be written as:

2. Relative path Method: Relative path method requires the picture to be stored in the project folder

A, when the picture is very file at the same level, read the path just write out the name of the picture

Read as:

b, when the picture and file are not at the same level, you need to use ".. /"To make it go up.

The path is written as:

C, b Case of the extension, when the file saved path is deeper, also need to use ". /"Make it go up

The path is written as:

Several ways to read pictures of project files in eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.