OpenCC-Java icon indicating copy to clipboard operation
OpenCC-Java copied to clipboard

Cannot read json file in config folder

Open timyip3 opened this issue 8 years ago • 2 comments

When I try to create OpenCC object, the system cannot find the corresponding json file in the jar file for conversion.

Here is the error message:

15:11:51,225 ERROR [stderr] (default task-39) java.io.FileNotFoundException: C:\wildfly-9.0.2.Final-IcmsScan\standalone\deployments\icmsscan-ear.ear\lib\OpenCC-Java-all-0.1.jar\config\s2t.json (The system cannot find the path specified)

15:11:51,226 ERROR [stderr] (default task-39) at java.io.FileInputStream.open0(Native Method)

15:11:51,226 ERROR [stderr] (default task-39) at java.io.FileInputStream.open(Unknown Source)

15:11:51,227 ERROR [stderr] (default task-39) at java.io.FileInputStream.(Unknown Source)

15:11:51,227 ERROR [stderr] (default task-39) at java.io.FileReader.(Unknown Source)

15:11:51,227 ERROR [stderr] (default task-39) at opencc.utils.Dictionary.loadDict(Dictionary.java:116)

15:11:51,227 ERROR [stderr] (default task-39) at opencc.utils.Dictionary.setConfig(Dictionary.java:82)

15:11:51,227 ERROR [stderr] (default task-39) at opencc.utils.Dictionary.(Dictionary.java:38)

15:11:51,227 ERROR [stderr] (default task-39) at opencc.OpenCC.(OpenCC.java:27)

timyip3 avatar Nov 17 '17 07:11 timyip3

same issue occurred when i ran the test cases

eagerjiang avatar Sep 10 '19 02:09 eagerjiang

I have rewritten the OpenCC project. The release of v0.2 can be downloaded from the release page.

Please try it and see if the issue is still there.

Note: there are settings required to be added to the module-info.java file. Please refer to README.md.

yichen0831 avatar Sep 16 '19 11:09 yichen0831