My Solution:
First I used
import java.util.Properties;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java io.IOException;
and loaded the file with
private static String InFile;
String Path;
Properties props = new Properties();
FileInputStream in = null;
try{
in = new FileInputStream(new File(Path));
} catch(FileNotFoundException e1) {
ErrorHandling.printError("Error");
}
try{
props.load(in);
} catch(IOException e) {
ErrorHandling.printError("Error");
}
I got my path by searching in file by a key word p.E.
InFile = props.getProperty("Path=");
and thats not a good idea for that what I did.
As I said, I wanted to check if there is any backslash in the path, if yes then add another backslash.
Well, that's what I did instead of using this properies:
import java.util.Scanner;
import java.io.FileReader;
String Lines = null;
FileReader fr = new FileReader(Path);
Scanner input = new Scanner(fr);
while(input.hasNextLine())
{
Lines = input.nextLine();
System.out.println(Lines);
}
I hope everyone understand what I'm trying to explain :)
Painjofshem