java project executable jar file after the export operation error ( no problem when debugging )
------ Solution ------------------------------------ -------- when
read resource file ( configuration file ) , instead of using getResourceAsStream getResource before use FileReader.
because the package , this document has no independent existence , it is impossible to use FileReader or FileInputStream for file access.
------ For reference only -------------------------------------- -
changed the jar file only read
Now there is a new problem encountered in the path Chinese how to do ?
------ For reference only -------------------------------------- -
/ C :/ Users / Administrator / Desktop /% e6% ba% 90% e7% a0% 81/__DownLoad__/bin /
Such a path
------ For reference only ------------------------------- --------
I can not stand
------ For reference only ----------------------------------- ----
Chinese path is not necessarily a solution , and try to deal first with Unicode path , the reduction of the character first .
没有评论:
发表评论