本文主要介绍了在eclipse中开发的简单的文件操作程序,在导包时注意不要添加错误。以防出现不必要的错误
import java.io.IOException;
import java.net.URI;import java.net.URISyntaxException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.Path;
public class Shell {
public static void main(String[] args) throws Exception {
//在此添加需要运行的程序
}
public static FileSystem getFileSystem() throws URISyntaxException, IOException{
//获取基本的配置文件
Configuration conf = new Configuration() ;