The environment variables of the JDK have been modified before,,,, under/etc/profile,,
Export Java_home=/usr/java/jdk1.7.0_67-cloudera
Export Path=${java_home}/bin:${path}
Before running Kafka, he was working,, but once, after modifying the Kafka configuration option, he would have an error,,,
The input java-version shows the version of 1.6.0.20,,,
Then you want to delete 1.6.0.20 's JDK
Query First: rpm-qa| grep JDK
Re-uninstall: Rpm-e XXX
Too much reliance, and to be removed, would cost the old much time,,, don't be afraid,, and now teach you a simple solution,,,,
Vim./kafka-server-start.sh before the script executes, first add the Java environment variable
1 export JAVA_HOME=/USR/JAVA/JDK1. 7. 0_67-clouderaExport Path=${java_home}/bin:${path}
Then you can run the command ....
This question to my idea is time tight, can change a thought,,, do not follow the conventional idea,,, normal words, or all unload,, and then put the Java path into the/etc/profile inside, once and for all!!!
The above method is only a temporary move! Time is tight to use.
How to modify the environment variables of Java quickly and efficiently