Error reported using SonarQube scanner in Jenkins

I wanted to integrate Jenkins with SonarQube, but after installing the plugin for sonar, I configured SonarQube server and started reporting errors saying java could not be found. I have configured both Sonarqube servers and SonarScanner installations. I really need help!!!

Error:
[dlwl] $ /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube/bin/sonar-scanner -Dsonar.host.url=http://192.168.130.160:9000/ ******** -Dsonar.projectBaseDir=/home/jenkins/workspace/大理文旅/前端/dlwl
Could not find ‘java’ executable in JAVA_HOME or PATH.
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeed?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE
And I list my environment:
Jenkins: 2.479.2
OS: Linux - 3.10.0-1160.el7.x86_64
Java: 17.0.8 - Oracle Corporation (Java HotSpot™ 64-Bit Server VM)

ace-editor:1.1
ant:481.v7b_09e538fcca
antisamy-markup-formatter:162.v0e6ec0fcfcf6
apache-httpcomponents-client-4-api:4.5.14-208.v438351942757
asm-api:9.7.1-97.v4cc844130d97
bootstrap5-api:5.3.2-3
bouncycastle-api:2.30.1.78.1-248.ve27176eb_46cb_
branch-api:2.1128.v717130d4f816
build-timeout:1.33
caffeine-api:3.1.8-133.v17b_1ff2e0599
checks-api:2.0.2
cloudbees-folder:6.858.v898218f3609d
command-launcher:107.v773860566e2e
commons-lang3-api:3.17.0-84.vb_b_938040b_078
commons-text-api:1.11.0-108.v2c41b_8b_2b_269
config-file-provider:980.v88956a_a_5d6a_d
credentials:1389.vd7a_b_f5fa_50a_2
credentials-binding:681.vf91669a_32e45
display-url-api:2.204.vf6fddd8a_8b_e9
durable-task:568.v8fb_5c57e8417
echarts-api:5.4.0-7
email-ext:2.91
font-awesome-api:6.5.1-2
git:5.2.1
git-client:4.7.0
github:1.35.0
github-api:1.303-400.v35c2d8258028
github-branch-source:1695.v88de84e9f6b_9
gitlab-plugin:1.8.0
gradle:1.39.4
gson-api:2.10.1-15.v0d99f670e0a_7
handlebars:3.0.8
instance-identity:201.vd2a_b_5a_468a_a_6
ionicons-api:74.v93d5eb_813d5f
jackson2-api:2.17.0-379.v02de8ec9f64c
jakarta-activation-api:2.1.3-1
jakarta-mail-api:2.1.3-1
javadoc:243.vb_b_503b_b_45537
javax-activation-api:1.2.0-7
javax-mail-api:1.6.2-10
jaxb:2.3.9-1
jdk-tool:73.vddf737284550
jersey2-api:2.44-151.v6df377fff741
jjwt-api:0.11.5-77.v646c772fddb_0
joda-time-api:2.12.7-29.v5a_b_e3a_82269a_
jquery3-api:3.7.1-1
jsch:0.2.16-86.v42e010d9484b_
json-api:20240303-41.v94e11e6de726
json-path-api:2.9.0-118.v7f23ed82a_8b_8
junit:1309.v0078b_fecd6ed
ldap:725.v3cb_b_711b_1a_ef
localization-support:1.2
localization-zh-cn:371.v23851f835d6b_
mailer:470.vc91f60c5d8e2
mapdb-api:1.0.9-40.v58107308b_7a_7
matrix-auth:3.2.2
matrix-project:822.824.v14451b_c0fd42
mina-sshd-api-common:2.12.1-101.v85b_e08b_780dd
mina-sshd-api-core:2.12.1-101.v85b_e08b_780dd
momentjs:1.1.1
nodejs:1.6.2
okhttp-api:4.11.0-172.vda_da_1feeb_c6e
pam-auth:1.11
pipeline-build-step:540.vb_e8849e1a_b_d8
pipeline-github-lib:38.v445716ea_edda_
pipeline-graph-analysis:195.v5812d95a_a_2f9
pipeline-groovy-lib:612.v84da_9c54906d
pipeline-input-step:449.v77f0e8b_845c4
pipeline-maven:1396.veb_f07b_2fc1d8
pipeline-maven-api:1419.v89b_ec7a_c8b_c5
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2114.v2654ca_721309
pipeline-model-definition:2.2114.v2654ca_721309
pipeline-model-extensions:2.2114.v2654ca_721309
pipeline-rest-api:2.24
pipeline-stage-step:296.v5f6908f017a_5
pipeline-stage-tags-metadata:2.2114.v2654ca_721309
pipeline-stage-view:2.24
plain-credentials:183.va_de8f1dd5a_2b_
plugin-util-api:3.8.0
popper2-api:2.11.6-5
resource-disposer:0.24
scm-api:698.v8e3b_c788f0a_6
script-security:1369.v9b_98a_4e95b_2d
snakeyaml-api:2.3-123.v13484c65210a_
sonar:2.17.3
ssh-credentials:337.v395d2403ccd4
ssh-slaves:2.846.v1b_70190624f5
sshd:3.322.v159e91f6a_550
structs:338.v848422169819
subversion:2.16.0
timestamper:1.20
token-macro:400.v35420b_922dcb_
trilead-api:2.142.v748523a_76693
variant:60.v7290fc0eb_b_cd
workflow-aggregator:590.v6a_d052e5a_a_b_5
workflow-api:1336.vee415d95c521
workflow-basic-steps:994.vd57e3ca_46d24
workflow-cps:2759.v87459c4eea_ca_
workflow-durable-task-step:1199.v02b_9244f8064
workflow-job:1385.vb_58b_86ea_fff1
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:427.v4ca_6512e7df1
workflow-step-api:678.v3ee58b_469476
workflow-support:936.v9fa_77211ca_e1
ws-cleanup:0.43

I also checked the server, and I found I already installed plugins:
[root@localhost /root]$ls /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/
_ SonarQube
[root@localhost /root]ls /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube/bin/ sonar-scanner sonar-scanner.bat sonar-scanner-debug sonar-scanner-debug.bat [root@localhost /root]/var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube/bin/sonar-scanner --version
09:13:41.872 INFO Scanner configuration file: /var/lib/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube/conf/sonar-scanner.properties
09:13:41.875 INFO Project root configuration file: NONE
09:13:41.886 INFO SonarScanner CLI 6.2.1.4610
09:13:41.887 INFO Java 17.0.8 Oracle Corporation (64-bit)
09:13:41.888 INFO Linux 3.10.0-1160.el7.x86_64 amd64