0

我试图通过命令编译hadoop程序

root@one:/opt/jdk1.7.0_06/bin# ./javac -classpath /export/hadoop-1.0.1/hadoop-core-1.0.1.jar;/export/hadoop-1.0.1/log4j-1.2.17.jar -d /folder/classes /folder/src/ParallelIndexation.java

结果我也收到了以下消息

javac: no source files
Usage: javac <options> <source files>
use a help for a list of possible options
bash: /export/hadoop-1.0.1/log4j-1.2.17.jar: Permission denied

并且它发生在没有看到所有者/export/hadoop-1.0.1/log4j-1.2.17.jarroot最大权限的情况下,并且/folder/src/ParallelIndexation.java文件确实被设置存在(关于一行的注释javac: no source files)。解释如何消除错误。

4

1 回答 1

1

You need to use a colon (:) to separate path elements on unix systems - a semi colon denotes the a delimitation between commands, try this:

root@one:/opt/jdk1.7.0_06/bin# ./javac -classpath \
  /export/hadoop-1.0.1/hadoop-core-1.0.1.jar:/export/hadoop-1.0.1/log4j-1.2.17.jar \
  -d /folder/classes /folder/src/ParallelIndexation.java
于 2013-04-19T16:07:12.783 回答