Answer the question
In order to leave comments, you need to log in
Why are abracadabra printed?
Began to master work with files (Java). The program reads a file that contains Russian characters and displays some of them on the screen. Everything works correctly in NetBeans IDE , but the jar version of the program outputs this .
File Read Code
try {
String s="";
FileReader fr = new FileReader(flt.getAbsolutePath());
BufferedReader br = new BufferedReader(
new InputStreamReader(
new FileInputStream(flt.getAbsolutePath())));
String str = br.readLine();
String result = "";
while (str != null) {
result +=str+"\n";
str = br.readLine();
s=result;
}
}
catch (IOException e1) {
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question