1. my java home directory:/usr/local/java2. first, my environment variable configuration is correct, because I use java-version to view my actual java environment 3, but I encountered problems when using the jps command: 4. the online saying is that the environment variables are not configured. for example, the variables to be called are placed behind the variable calling formula. 5. if
1. my java home directory:/usr/local/java
2. first, my environment variable configuration is correct, because I use java-version to view the actual java environment
3. but I encountered a problem when using the jps command:
4. the online saying is that the environment variables are not configured. for example, the variables to be called are placed behind the variable calling formula;
5. if the environment variable configuration is correct, perform the following operations to fix the problem:
Step 1: Determine the compiled java directory, which must be/usr/local/java
Run the first command:
Update-alternatives -- install/usr/bin/java/usr/local/java/bin/java 300
Run the second command:
Update-alternatives -- install/usr/bin/javac/usr/local/java/bin/javac 300
Run the third command:
Update-alternatives -- config java
You can see. There are two java execution programs in the system. This should be because the jdk installed in the original rpm has not been uninstalled. Select Number 2, and the compiled java Directory
Run the fourth command:
Update-alternatives -- config javac
Same operation
6. run the JPS command to check whether the JPS can be used?
PS: If the file/usr/bin is not available
Ln-s/usr/local/java/bin/jps/usr/bin
Run this command.
PPS ~