安装为 snap 包时如何配置 netbeans? [英] How to configure netbeans when installed as snap package?

查看:73
本文介绍了安装为 snap 包时如何配置 netbeans?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过 snap 在 Ubuntu 18.04 上安装了 Netbeans 11.2.

现在我想配置 Netbeans,修改 netbeans.conf.此文件位于 /snap/netbeans/current/netbeans/etc/ 并作为只读文件系统挂载.所以我认为你不应该在这里编辑这个文件.

如果经典方式(编辑netbeans.conf)被阻止,我该如何配置Netbeans?

注意:我要设置netbeans_jdkhome="~/.sdkman/candidates/java/latest/".

更新

这有效:

netbeans --jdkhome ~/.sdkman/candidates/java/latest

解决方案

您可以拥有 netbeans 配置的用户本地版本.只需将全局 netbeans.conf 从全局快照位置复制到您的 Netbeans 用户目录并在那里进行更改.

Netbeans 11.3 版示例:

<前>mkdir ~/snap/netbeans/common/data/11.3/etccp/snap/netbeans/current/netbeans/etc/netbeans.conf ~/snap/netbeans/common/data/11.3/etc/netbeans.confgedit ~/snap/netbeans/common/data/11.3/etc/netbeans.conf

注意:每当用户目录因版本更新而发生变化时,您都需要重复此过程.IE.从 11.3 -> 12 等

I installed Netbeans 11.2 on Ubuntu 18.04 via snap.

Now i want to configure Netbeans, modifying netbeans.conf. This file is placed at /snap/netbeans/current/netbeans/etc/ and is mounted as read-only file system. So i assume you should not edit this file here.

How do i configure Netbeans if the classic way (editing netbeans.conf) is blocked?

Note: I want to set netbeans_jdkhome="~/.sdkman/candidates/java/latest/".

UPDATE

This works:

netbeans --jdkhome ~/.sdkman/candidates/java/latest

解决方案

You CAN have user local versions of the netbeans configuration. Just copy the global netbeans.conf from the global snap location to your Netbeans user directory and make your changes there.

Example for version 11.3 of Netbeans:

mkdir ~/snap/netbeans/common/data/11.3/etc
cp /snap/netbeans/current/netbeans/etc/netbeans.conf ~/snap/netbeans/common/data/11.3/etc/netbeans.conf
gedit ~/snap/netbeans/common/data/11.3/etc/netbeans.conf

NOTE: You will need to repeat this process whenever the user directory changes as a result of a version update. Ie. from 11.3 -> 12, etc.

这篇关于安装为 snap 包时如何配置 netbeans?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆