I have the following code reading a file containing unicode text (Japanese).
File f = new File("f.txt"); // the file was saved with utf-8 encoding
FileReader fr = new FileReader(f);
BufferedReader br = new BufferedReader(fr);
s = br.readLine();
lblData.setText(s); // JLabel lblData was set font as Tahoma
br.close();
fr.close();
Im using window 7 and the system already installed Japanese font (MSMINCHO.TTF).
If I run the above code in Netbeans (6.9) editor then the program display correctly.
But when I exported to jar file and run the program independently of Netbeans, then it is no longer displaying correctly.
I dont know why this happened and how to fix it?