java 输入格式错误_eclipse – Git错误:格式错误的输入或输入包含不可映射的chacraters...

您可以在

this issue中看到确切的调用堆栈:

java.nio.file.InvalidPathException: Malformed input or input contains unmappable chacraters: /Users/jettykoo/Desktop/WeTeam/Git/WSS/MaryKay/Doc/01/.DS_Store

at sun.nio.fs.UnixPath.encode(UnixPath.java:147)

at sun.nio.fs.UnixPath.(UnixPath.java:71)

at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)

at java.io.File.toPath(File.java:2186)

at org.eclipse.jgit.util.FileUtil.isFile(FileUtil.java:126)

at org.eclipse.jgit.util.FileUtil.canExecute(FileUtil.java:131)

我对sun/nio/fs/UnixPath.java的拼写错误感到惊讶:’chacraters’而不是’characters’!

正如this NetBeans issue中提到的那样(在Eclipse上下文中应该是相关的):

it’s a 07003 and also partially also Apple issue (the LC_CTYPE is not set by default).

The behaviour in terminal depends on the Terminal.app preferences.

When the Terminal export LC_CTYPE set to UTF-8 it works fine in terminal as the sun.jnu.encoding is set to the value of LC_CTYPE.

When it’s not set it does not work.

The problem with setting the sun.jnu.encoding is that it may be overwritten by the JDK, so it’s safer to export the LC_CTYPE=UTF-8.

Rather then addding -J-Dsun.jnu.encoding=UTF-8 to netbeans.conf, prepend the export LC_CTYPE=UTF-8 to it.

您可以在eclipse.ini中设置它(-DLC_CTYPE = UTF-8).

What helped me was adding two lines to eclipse.ini.

-DLC_CTYPE=UTF-8

-Dfile.encoding=UTF-8

Team commands stopped giving errors

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值