问题:
有没有办法通过CLI将下载的NBM(Netbeans模块(安装到已经安装的Netbeans IDE中?
当前设置
Windows 10版的Netbeans 12.3
Linux Mint 20.1版的Netbeans 12.3
相关场景
如果你想到了这个问题">为什么不直接使用GUI'或类似的东西。想想下面的场景。当你在一个有50台电脑的空气间隙网络上工作时,你必须在所有电脑上安装Netbeans插件。你可以在这些电脑上放文件,并通过控制台执行命令,你不想在所有的建筑物周围运行并点击整个过程。
事先非常感谢。
我想我找到了一个解决方案。我会把它贴在这里反映我的研究,因为我从来没有找到关于stackoverflow的答案。
当Netbeans已经安装时,您可以使用--help
参数,如:C:Program FilesNetBeansnetbeansbinnetbeans64.exe --help
这列出了很多可用的参数(我还没有在网上找到一个列表(,比如(缩写(:
General options:
--help show this help
--jdkhome <path> path to JDK
--console new open new console for output
Module reload options:
--reload /path/to/module.jar install or reinstall a module JAR file
Additional module options:
--modules
--refresh Refresh all catalogs
--list Prints the list of all modules, their versions and enablement status
--install <arg1>...<argN> Installs provided JAR files as modules
--disable <arg1>...<argN> Disable modules for specified codebase names
--enable <arg1>...<argN> Enable modules for specified codebase names
--update <arg1>...<argN> Updates all or specified modules
--update-all Updates all modules
Core options:
--fontsize <size> set the base font size of the user interface, in points
--userdir <path> use specified directory to store user settings
--nosplash do not show the splash screen
在我的案例中,解决方案是使用指向要安装的jar文件的--install
参数
请注意,NBM文件只是包含jar文件和一些元数据文件(如配置xml文件(的容器。例如,您可以通过7zip打开它而且您必须自己处理所有的依赖关系。