前言
小白一枚,本文简单实现了批量上传遥感影像至HDFS,所以没有实现窗体简单的关闭、缩小、取消等功能。重申这只是简单demo!话不多说直接上代码。
@MarcusPlus
package com.hdfs;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URI;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JPanel;
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 Demo {
public static void main(String[] args) {
// 创建 JFrame 实例
JFrame frame = new JFrame("Demo");
// Setting the width and height of frame
frame.setSize(512, 512);
frame.setLocation(400,