Java NetBeans 配置文件 (netbeans.conf) 位于何处?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2447867/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 07:48:30  来源:igfitidea点击:

where is the NetBeans config file (netbeans.conf) located?

javanetbeansconfig

提问by Max Frai

my NetBeans has ugly fonts in interface. I'm going to make antialiasing for it. In internet I saw that there is should be

我的 NetBeans 在界面中有难看的字体。我要为它做抗锯齿。在互联网上我看到应该有

-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=on

-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=on

in netbeans_default_options. This file should be located in /etc/netbeans.conf. But there isn't this file. I have NetBeans 6.8. Help, please.

netbeans_default_options 中。此文件应位于 /etc/netbeans.conf 中。但是没有这个文件。我有 NetBeans 6.8。请帮忙。

UPD:

更新

[ockonal@wincode ~]$ cd ~/.netbeans/6.8/

[ockonal@wincode 6.8]$ ls

ant build.properties docs lib modules sources update_tracking bin config
jsstubs lock native update var

[ockonal@wincode ~]$ cd ~/.netbeans/6.8/

[ockonal@wincode 6.8]$ ls

ant build.properties docs lib modules sources update_tracking bin config
jsstubs lock native update var

UPD2With utilite find I did:

UPD2使用 utilite find 我做了:

find / -name 'netbeans.conf'

find / -name 'netbeans.conf'

This gave me:

这给了我:

/usr/share/netbeans/etc/netbeans.conf

/usr/share/netbeans/etc/netbeans.conf

采纳答案by wtaniguchi

In my NetBeans 6.7, this file is located at

在我的 NetBeans 6.7 中,此文件位于

{netbeans-installation-dir}/etc/netbeans.conf

I guess if you are using Windows, and the default folders, you should be able to find somewhere here:

我想如果您使用的是 Windows 和默认文件夹,您应该可以在这里找到:

C:\Program Files\NetBeans 6.8\etc\netbeans.conf

On a linux box, you should be able to find the file somewhere here

在 linux 机器上,您应该能够在此处的某处找到该文件

On Linux the installer lets the user choose where you want to install NetBeans. You may find it under /home/yourname/netbeans/etc/netbeans.conf or /opt/netbeans/etc/netbeans.conf. [ from http://wiki.netbeans.org/FaqNetbeansConf]

在 Linux 上,安装程序让用户选择要安装 NetBeans 的位置。您可以在 /home/yourname/netbeans/etc/netbeans.conf 或 /opt/netbeans/etc/netbeans.conf 下找到它。[来自http://wiki.netbeans.org/FaqNetbeansConf]

回答by Krishna

On an ubuntu platform you can use the following command

在 ubuntu 平台上,您可以使用以下命令

locate netbeans.conf

to find where the netbeans files are located. It's the best way that provides with a precise location of your netbeans.conf file.

找到 netbeans 文件所在的位置。这是提供 netbeans.conf 文件精确位置的最佳方式。

Hope this will help someone in need.

希望这会帮助有需要的人。

回答by Yogev

On Mac OS X:

在 Mac OS X 上:

/Applications/NetBeans/NetBeans XXX.app/Contents/Resources/NetBeans/etc/netbeans.conf

(Where XXX is The installed version of NetBeans)

(其中 XXX 是已安装的 NetBeans 版本)

Example for NetBeans 8.0:

NetBeans 8.0 示例:

/Applications/NetBeans/NetBeans 8.0.app/Contents/Resources/NetBeans/etc/netbeans.conf

回答by TonyG

Current as of this date for Windows, go to %APPDATA%\NetBeans, then the version (I have 8.2 and dev). In there you'll find a config folder with tons of stuff under it. I came to this Q&A looking for info on fonts and colors. That info is now found under config\Editors. Some base info for your themes are in there under FontsColors. Styling and color details are under folder text, and then in subfolders similar to the above.

当前 Windows 的当前日期,转到%APPDATA%\NetBeans,然后是版本(我有 8.2 和 dev)。在那里你会找到一个 config 文件夹,里面有很多东西。我来到这个问答中寻找有关字体和颜色的信息。现在可以在 下找到该信息config\Editors。您的主题的一些基本信息位于FontsColors. 样式和颜色详细信息位于文件夹 下text,然后位于与上述类似的子文件夹中。

As an example, I went to tools>options>Fonts&Colors. I duplicated the Darcula profile into (my initials) TGDark to make changes. Then to Syntax, HTML, and "Javascript Embedded in HTML", I set the background color to #3F2B2B. Now, in the file system I found this setting under:

例如,我转到工具>选项>字体和颜色。我将 Darcula 配置文件复制到(我的首字母缩写)TGDark 中以进行更改。然后到语法、HTML 和“嵌入在 HTML 中的 Javascript”,我将背景颜色设置为 #3F2B2B。现在,在文件系统中,我在以下位置找到了此设置:

C:\Users\tony\AppData\Roaming\NetBeans\dev\config\Editors\text\html\FontsColors\TGDark\org-netbeans-modules-editor-settings-CustomFontsColors-tokenColorings.xml

And in that file, note the bgcolor:

在该文件中,注意 bgcolor:

<fontcolor bgColor="ff3f2b2b" default="default" name="javascript-embedded"/>

What an adventure...

多么冒险...