private void ProcessJob() {

		processJob = new Thread(new Runnable() {

			public void run() {
				// TODO Auto-generated method stub			

				final UploadProcessFrame frame = new UploadProcessFrame();
				Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();

				frame.setLocation(dim.width / 2 - frame.getWidth() / 2,
						dim.height / 2 - frame.getHeight() / 2);

				while (uploads.size() != 0) {
					frame.setAlwaysOnTop(true);
					frame.setVisible(true);
					frame.cancel.setEnabled(true);
					frame.quit.setEnabled(true);
					UploadProcessJob job = null;

					uploadItem it = uploads.get(0);
					File f = it.getF();
					/**
					 * 显示文件名
					 */
					//String uploadName=it.getUploadName();
					String title = it.getUploadName();
					title=title.substring(0,title.lastIndexOf("."));
				
					String remoteFile=CommonUtil.createPrimaryKey();//随机生成上传文件名称
					String fileName = it.getF().getName();
					String ext = fileName.substring(fileName.lastIndexOf(".")+1);					
					remoteFile=remoteFile+"."+ext;
					


					try {
						//job = new UploadProcessJob(hostName, ftport, f,
								//folderPath, ftpuser, ftppass, uploadName);
						
						job = new UploadProcessJob(hostName, ftport, f,
								folderPath, ftpuser, ftppass, remoteFile);
					} catch (FTPException e) {
						e.printStackTrace();
					} catch (IOException e) {
						e.printStackTrace();
					}

					frame.job = job;
					job.setProcessControl(frame);
					job.start();
					//win.eval("aa()");uploadFile(title,ext,pzm,pathname,efilename)
					String pzm=getPzmComboBox().getSelectedItem().toString();
					win.eval("uploadFile('"+title+"','"+ext+"','"+pzm+"','"+folderPath+"','"+remoteFile+"')");
					

					try {

						Thread.sleep(200);
					} catch (InterruptedException e1) {
						e1.printStackTrace();
					}

					while (!job.isfinish()) {
						try {
							Thread.sleep(500);
							if (job.ftpcom.isover()) {
								frame.label7.setVisible(true);
								frame.cancel.setEnabled(false);
								frame.quit.setEnabled(false);
							}
						} catch (InterruptedException e) {
							e.printStackTrace();
						}
					}

					if (job.breakAll) {
						uploads.removeAll(uploads);
						deleteFileTrig();
						break;
					}

					job.Curstop();
					frame.label7.setVisible(false);
					uploads.remove(0);
					jtable.updateUI();
				}

				if (0 == uploads.size()) {
					frame.setVisible(false);
					JOptionPane.showMessageDialog(null, "上传任务完毕");
					deleteFileTrig();
					processJob.interrupt();
				}
			}

		});

		processJob.start();

	}