Idea 使用JAVA Compile打包中文乱码问题
使用Idea调试程序,发现中文乱码,
但是由相对路径获取的却没有中文乱码,所以问题出在编译的class文件上。
果然问题出在编译的class文件上。
修改Java compile配置,File | Settings | Build, Execution, Deployment | Compiler | Java Compiler ,-encoding utf-8
重新编译就可以了。
使用Idea调试程序,发现中文乱码,
但是由相对路径获取的却没有中文乱码,所以问题出在编译的class文件上。
果然问题出在编译的class文件上。
修改Java compile配置,File | Settings | Build, Execution, Deployment | Compiler | Java Compiler ,-encoding utf-8
重新编译就可以了。