简体   繁体   English

Netbeans IDE 7.4 Ctrl +空格错误

[英]Netbeans IDE 7.4 ctrl+space bug

My problem is when I'm using ctrl+space on Netbeans my IDE generates my codes with 'ı' character like voıd or publıc and I have fix with my hand. 我的问题是,当我在Netbeans上使用ctrl + space时,IDE会生成带有“ı”字符(如voıdpublıc代码,并且我已经用手修复了。 When I'm coding in Java, when I want to generate getters and setters automatically, Netbeans generates these methods with Turkish characters (replaces the english i with 'ı'), such as voıd or ınt and publıc . 当我使用Java进行编码时,当我想要自动生成getter和setter时,Netbeans会使用土耳其语字符(用voıd代替英语i)来生成这些方法,例如voıdıntpublıc How can I fix that bug? 我该如何解决该错误? Here is part of my trouble: 这是我麻烦的一部分:

public ınt getAge() {
    return age
}

publıc voıd setAge(ınt age) {
    this.age = age;
}

The same was reported as a bug 相同的被报告为错误

See if this can help you 看看这是否可以帮助您

Which says : 上面说:

Netbeans automatically uses the Windows system default language as the default user interface language. Netbeans自动使​​用Windows系统默认语言作为默认用户界面语言。 I believe that it means to be a nice feature for localization. 我相信这意味着成为本地化的一个不错的功能。 But I personally find it uncomfortable because I have been used with English interface. 但是我个人觉得很不舒服,因为我已经使用过英语界面。

After I did some Google search, I learned a few tips to set the Netbeans UI language. 在进行了Google搜索之后,我学到了一些设置Netbeans UI语言的技巧。

  1. Temporary Solution 临时解决方案

    Add "--locale en:US" at the end of Netbeans startup command. 在Netbeans启动命令的末尾添加“ --locale en:US”。

    "C:\\Program Files\\NetBeans 6.0.1\\bin\\netbeans.exe" --locale en:US “ C:\\ Program Files \\ NetBeans 6.0.1 \\ bin \\ netbeans.exe” --locale zh:US

  2. Permanent Solution 永久解决方案

    Go to Netbeans installation directory, for example, 转到Netbeans安装目录,例如,

    C:\\Program Files\\NetBeans 6.0.1\\etc C:\\ Program Files \\ NetBeans 6.0.1 \\ etc

    Open "netbeans.conf" and find netbeans default option line 打开“ netbeans.conf”并找到netbeans默认选项行

    netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true" netbeans_default_options =“-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize = 32m -J-XX:MaxPermSize = 200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar = true”

    Add "-J-Duser.language=en -J-Duser.region=US" to the end of this line 在此行的末尾添加“ -J-Duser.language = en -J-Duser.region = US”

    netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-Duser.language=en -J-Duser.region=US" netbeans_default_options =“-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize = 32m -J-XX:MaxPermSize = 200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar = true -J- Duser.language = zh-J-Duser.region = US”

This is a common problem with foreign languages. 这是外语常见的问题。 I have faced this since I'm also from Turkey. 我也来自土耳其,因此我已经面对了这个问题。 Here is how to fix it: 解决方法如下:

Go to the NetBeans IDE install directory . 转到NetBeans IDE安装目录 Go to the folder etc and open netbeans.conf with a text editing program such as Notepad or Notepad++ . 转到文件夹etc并使用文本编辑程序(例如NotepadNotepad ++)打开netbeans.conf Then find netbeans_default_options= , preferably with CTRL+F and add -J-Dfile.encoding=UTF-8 to the existing values. 然后找到netbeans_default_options= ,最好使用CTRL + F并将-J-Dfile.encoding=UTF-8到现有值。 After that, just save and reload Netbeans IDE . 之后,只需保存并重新加载Netbeans IDE即可

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM