添加用户库: (eclipse)
project右键properties->java build path->add library->user library
导入jar包:
在hadoop的share文件下,首先导入hdfs中的第一个包,以及hdfs/lib中的所有的包,其次导入common中的第一个包和common/lib中的所有的包
具体编程:
首先通过Configuration conf导入配置文件(注意要把相应的xml配置文件建立在同目录下)
调用FileSystem的方法实现功能
额外知识:
- Eclipse调整字体大小
Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Text Font -> Edit 调节控制条字体大小 。
Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Java -> Java Editor Text Font -> Edit 调节主窗口字体大小。 - Eclipse如何调整快捷键
Eclipse工具栏上选择Window -> Preferences -> General -> Keys
网友评论