Solve the problem of Too many levels of symbolic links

Too many levels of symbolic links when using ln to create soft links

[email protected]:/opt/jdk1.8.0_181/bin# ln-s Java /usr/local/bin/ Java

change to:
root @instancevgiv786y :/opt/jdk1.8.0_181/bin# ln-s /opt/jdk1.8.0_181/bin/ Java /usr/local/bin/ Java
Obviously I’m installing the JDK, but why would I want to create this soft connection?Just add the environment variable at /etc/profile. However, when I connected this server as one of Jenkins’ nodes, I was surprised to find that Java could not be found. Obviously, I added the environment variable and it took effect. Jenkins had to look under various bin directory, so I created this soft connection.

Read More: