1
votes

I'm new in java. I want to convert my text file in ARFF format but my texts is Persian and NetBeans can not display these in a good format (utf-8 format ) in this topic:

http://weka.wikispaces.com/Text+categorization+with+Weka#UTF-8

said that i should run this:

java -Dfile.encoding=utf-8 -classpath ...

but i want to use this command in my code. I do not know how should i run java in command. Can anyone tell me how should i do this line in my code?

thank you in advance

1

1 Answers

0
votes

Don't use Weka, since you are already using NetBeans, it's better if you change NetBeans configuration to UTF-8

  1. Open etc folder inside the Netbeans directory (path where you installed NetBeans). Edit netbeans.conf using Notepad or any text editor.

  2. Look for this field: netbeans_default_options add If it is already present, change it to
    -J-Dfile.encoding=UTF-8

  3. Else, add a new line at the end of the file:

    netbeans_default_options="-J-Dfile.encoding=UTF-8"
    
  4. Restart Netbeans.