简体   繁体   English

Netbeans 插拔安装离线

[英]Netbeans pluging installation offline

I have a system which is offline and has no access to Internet.我的系统处于脱机状态,无法访问 Internet。

I want to add Java Card plugin to my Netbeans.我想在我的 Netbeans 中添加 Java 卡插件。 How can I add Java Card plugin on my PC (which is offline)?如何在我的电脑(离线)上添加 Java 卡插件?

I could not find.nbm file for Java card for its offline installation.我找不到用于离线安装的 Java 卡的 .nbm 文件。

PS I have a 2nd system which is up and running and has Java Card plugin on its Netbeans. PS我有第二个系统,它已启动并正在运行,并且在其 Netbeans 上有 Java 卡插件。 I thought this might help to copy files from 2nd PC to 1st PC.我认为这可能有助于将文件从第二台 PC 复制到第一台 PC。 But I was looking to a better approach.但我一直在寻找更好的方法。

This following approach is a bit of a hack, but it worked for me.以下方法有点像黑客,但它对我有用。 On a NetBeans installation which has internet access, but does not yet have Java Card installed:在可以访问 Internet 但尚未安装 Java 卡的 NetBeans 安装上:

  • Go to Tools > Plugins , and download/install the Java Card plugin. Go 到Tools > Plugins ,然后下载/安装 Java Card 插件。 In my case installing the Java Card plugin triggered the download and installation of several other required plugins:在我的情况下,安装 Java 卡插件触发了其他几个必需插件的下载和安装:

    JavaCard 插件安装

  • Specifically choose not to restart NetBeans during the plugin process.具体在插件过程中选择不重启NetBeans。

  • Within your NetBeans installation directory, the installation of the Java Card plugin will have created a directory named javacard/update/download .在 NetBeans 安装目录中,安装 Java 卡插件将创建一个名为javacard/update/download的目录。 In my case the full path of that directory is C:/NetBeans14/javacard/update/download , but yours will almost certainly be different.在我的情况下,该目录的完整路径是C:/NetBeans14/javacard/update/download ,但您的几乎肯定会有所不同。

  • Copy the content of that directory to some arbitrary empty directory on your machine without internet access.将该目录的内容复制到您机器上的某个任意空目录,而无需访问 Internet。

The copied directory on your offline machine should look similar to this, with a couple of XML files and thirteen plugins with the nbm file extension:离线机器上复制的目录应该与此类似,其中包含几个 XML 文件和 13 个带有nbm文件扩展名的插件:

07/30/2022  02:39 PM             1,633 additional_information.xml
07/30/2022  02:39 PM             2,619 install_later.xml
07/30/2022  02:37 PM           110,204 org-netbeans-modules-javacard-apdu-io.nbm
07/30/2022  02:37 PM            89,498 org-netbeans-modules-javacard-apdufile.nbm
07/30/2022  02:37 PM           109,226 org-netbeans-modules-javacard-common.nbm
07/30/2022  02:37 PM           110,491 org-netbeans-modules-javacard-console.nbm
07/30/2022  02:37 PM           106,018 org-netbeans-modules-javacard-filemodels.nbm
07/30/2022  02:37 PM            84,771 org-netbeans-modules-javacard-kit.nbm
07/30/2022  02:37 PM            89,855 org-netbeans-modules-javacard-platform-ui.nbm
07/30/2022  02:37 PM           426,563 org-netbeans-modules-javacard-project.nbm
07/30/2022  02:37 PM           177,235 org-netbeans-modules-javacard-ri-platform.nbm
07/30/2022  02:38 PM           131,152 org-netbeans-modules-javacard-spi.nbm
07/30/2022  02:37 PM            92,895 org-netbeans-modules-properties-based-dataobjects.nbm
07/30/2022  02:37 PM            89,160 org-netbeans-modules-simple-project-templates.nbm
07/30/2022  02:37 PM            90,796 org-netbeans-modules-swing-customizerlayout.nbm

The thirteen nbm files correspond to the thirteen plugins listed in the Verify Certificate screenshot above.十三个nbm文件对应于上面验证证书屏幕截图中列出的十三个插件。

Finally, on the offline machine select Tools > Plugins > Downloaded > Add Plugins , navigate to the directory containing the copied plugins that you just created (named JavaCardPlugins in my case), select all of the nbm files for installation, select All Files from the Files of Type drop list, and click the Open button: Finally, on the offline machine select Tools > Plugins > Downloaded > Add Plugins , navigate to the directory containing the copied plugins that you just created (named JavaCardPlugins in my case), select all of the nbm files for installation, select All Files from the Files of Type下拉列表,然后单击Open按钮:

离线安装插件

Once Java Card and its associated plugins have been installed, choose to restart NetBeans, and you should see that the Java Card plugin is listed under Tools > Plugins > Installed .安装 Java 卡及其相关插件后,选择重新启动 NetBeans,您应该会看到 Java 卡插件列在Tools > Plugins > Installed

Notes:笔记:

  • It is important not to immediately restart NetBeans after installing Java Card on the machine with internet access because the nbm files to be copied to the offline machine will be deleted by NetBeans during the restart.重要的是不要在可以上网的机器上安装Java卡后立即重新启动NetBeans,因为在重新启动过程中,要复制到离线机器的nbm文件将被NetBeans删除。
  • You may not want to mess with your existing NetBeans installation on the machine with internet access, since you would need to uninstall/reinstall Java Card.您可能不想在可以访问 Internet 的机器上弄乱现有的 NetBeans 安装,因为您需要卸载/重新安装 Java 卡。 So either create a second temporary NetBeans installation solely for downloading/installing/copying the nbm files on that machine, or use an alternative machine with internet access.因此,要么创建第二个临时 NetBeans 安装,仅用于在该机器上下载/安装/复制nbm文件,或者使用具有 Internet 访问权限的替代机器。
  • You don't need to understand the purpose of the individual plugins, or the sequence in which they should be installed.您无需了解各个插件的用途或安装顺序。 Just select them all for installation at the same time and NetBeans will work out what needs to be done.只需 select 将它们全部同时安装,NetBeans 将确定需要做什么。
  • Although I have only verified this approach for Java Card, I suspect it would probably work for the offline installation of any plugin.虽然我只为 Java 卡验证了这种方法,但我怀疑它可能适用于任何插件的离线安装。

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

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