내가 서버 디렉토리에 인증 된 디렉토리에서 많은 파일을 이동하려고하지만, "기본이 오류를 스레드에서예외 : 없음 프로토콜 :
예외를 얻고있다 "java.net.MalformedURLException : 프로토콜 없음 : /PGJ/portal/Importador_Documentos_Financeiro/FILES/FINANCEIRO/RF255677.pdf (java.net.URL) (알 수없는 출처) at jcifs.smb.SmbFile (SmbFile.java:446) at importador_documentos.Main.main (Main.java:82)
나는 많은 것을 시도했지만 아무 것도하지 않았다. 누군가가 나를 도울 수 있습니까?
public class Main {
public static String Pasta_Financeiro = System.getProperty("user.dir") +
File.separatorChar + "FILES" + File.separatorChar +
"FINANCEIRO" + File.separatorChar;
public static void main(String[] args) throws ClassNotFoundException,
SQLException,
FileNotFoundException,
IOException,
AuthenticationException
{
try{
jcifs.Config.registerSmbURLHandler();
NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("cabanellos.local", "deivisson.sedrez", "password");
String path = "smb://fsct/scanpr$/";
SmbFile sFile = new SmbFile(path.toString(), auth);
SmbFile[] varTeste = sFile.listFiles();
SmbFile dir = new SmbFile(path.toString(), auth);
System.out.println(dir.getDate());
URL site;
for(int i=0;i<varTeste.length;i++){
if(varTeste[i].isFile()){
//site = new URL((Pasta_Financeiro + varTeste[i].getName()).toString());
SmbFile dest = new SmbFile ("//"+Pasta_Financeiro + varTeste[i].getName());
dir.copyTo(dest);
}
}
//rest of content...
}
를 참조하면 심지어 미리 보는나요? http://stackoverflow.com/editing-help#code – SLaks