解决方案-在Mac系统中,Eclipse无法导入含有中文路径的工程

时间:2014-09-03 11:15:56   收藏:0   阅读:309

1、修改eclipse.app/Contents/Info.plist,查找

<key>CFBundleExecutable<key>
在其上方添加以下代码 


<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">  
<plist version="1.0">  
    <dict>  
        <key>LSEnvironment</key>  
        <dict>  
            <key>JAVA_TOOL_OPTIONS</key>  
            <string>-Dfile.encoding=UTF-8</string>  
            <key>LANG</key>  
            <string>zh_CN.UTF-8</string>  

        </dict>  
        <key>CFBundleExecutable<key>


2、修改eclipse.app/Contents/MacOS/eclipse.ini,在最后一行添加 -Dfile.encoding=UTF-8

3、关闭eclipse,重新启动,并退出

4、打开命令终端,执行如下命令

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/eclipse/eclipse.app


5  重新启动Eclipse

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!