When CProgramCompile the program, but it tells you that the configuration, logging, and other classes are missing. If there is a lack of classes, add × in the classpath. Jar path;
Note that classpath is a search class in a file. (no recursive search is available)
While path searches for files (recursive search)
During compilation, various HDFS. h cannot be found:
When I write the MAKEFILE file below, it will be okay:
Hadoop_install =/usr/local/hadoopjava_home =/usr/lib/JVM/java-1.6.0-openjdk-i386PLATFORM = Linux-i386-32CPPFLAGS =-I $ (hadoop_install) /src/C ++/libhdfslib =-L $ (hadoop_install) /C ++/Linux-i386-32/liblib + =-I $ {java_home}/includelibjvm =$ {java_home}/JRE/lib/i386/client/libjvm. soldflags + =-lhdfstest: test. CGCC $? $ (Cppflags) $ (LIB) $ (ldflags) $ (libjvm)-o $ @ clean: Rm Test
Various types or library so files cannot be found at runtime
My ~ /. Bashrc:
It is normal:
Export hadoop_install =/usr/local/hadoop export hadoop_jardir =$ {hadoop_install}/jardir export classpath =.: $ java_home/lib/tools. jar: $ java_home/lib/DT. jar: $ hadoop_ja rdir/hadoop-core-1.0.4.jar: $ packages/hadoop-tools-1.0.4.jar: $ hadoop_jar DIR/commons-configuration-1.6.jar: $ hadoop_jardir/commons-logging-1.1.1.jar: $ hadoop_jardir/commons-logging-api-1.0.4.jar: $ hadoop_jardir/log4j-1.2.15.jar: $ hadoop_jardir/commons-lang-2.4.jar
1. If you want to delete a variable available:
Unset variable name
2. To modify:
Set variable name
3. To add a variable temporarily:
Export variable name =
4. Change the configuration file to be permanent;
/Etc/profile
~ /. Bashrc
Add:
Export variable name =