VSB
VSB

Reputation: 10415

Netbeans pluging installation offline

I have a system which is offline and has no access to Internet.

I want to add Java Card plugin to my Netbeans. How can I add Java Card plugin on my PC (which is offline)?

I could not find .nbm file for Java card for its offline installation.

P.S. I have a 2nd system which is up and running and has Java Card plugin on its Netbeans. I thought this might help to copy files from 2nd PC to 1st PC. But I was looking to a better approach.

Upvotes: 0

Views: 1124

Answers (1)

skomisa
skomisa

Reputation: 17373

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:

  • Go to Tools > Plugins, and download/install the Java Card plugin. In my case installing the Java Card plugin triggered the download and installation of several other required plugins:

    JavaCard plugin installation

  • Specifically choose not to restart NetBeans during the plugin process.

  • Within your NetBeans installation directory, the installation of the Java Card plugin will have created a directory named 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.

  • Copy the content of that directory to some arbitrary empty directory on your machine without internet access.

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:

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.

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:

Offline installation of plugin

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.

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.
  • 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. 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.
  • 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.
  • Although I have only verified this approach for Java Card, I suspect it would probably work for the offline installation of any plugin.

Upvotes: 2

Related Questions