English 中文(简体)
Jython - NetBeans Plugin & Project
  • 时间:2024-12-22

Jython - NetBeans Plugin and Project


Previous Page Next Page  

Python and Jython support for NetBeans is available via the nbPython plugin. Download the plugin from following URL - http://plugins.netbeans.org/plugin/56795. Unzip the downloaded archive in some folder. For example - d: bplugin. To install the NetBeans Plugin, let us follow the steps given below.

Step 1 − Start the Netbeans IDE and then go to Tools/Plugin to open the Plugin Manager. Choose ‘Downloaded’ tab and browse to the folder in which the downloaded file has been unzipped. The NetBeans window will appear as shown below.

Netbeans IDE

Step 2 − The next step is to select all the .nbm files and cpck open.

nbm

Step 3 − Cpck on the Install button.

Install Button

Step 4 − Accept the following pcense agreement to continue.

Agreement

Ignore the warning about untrusted source of plugins and restart the IDE to proceed.

Jython Project in NetBeans

Once restarted, start a new project by choosing File/New. Python category will now be available in the categories pst. Choose it to proceed.

Category

If the system has Python installed, its version/versions will be automatically detected and shown in the Python platform dropdown pst. However, Jython will not be psted. Cpck on the Manage button to add it.

Python

Cpck on the ‘New’ button to add a platform name and path to Jython executable.

Jython Executable

Jython will now be available in the platform pst. Select from the dropdown pst as shown in the following screenshot.

Dropdown List

We can now fill in the project name, location and main file in the next window.

Project Name

The project structure will appear in the projects window of the NetBeans IDE and a template Python code in the editor window.

Projects Window

Template Python Code

Build and execute the Jython project to obtain the following result in the output window of the NetBeans IDE.

Output Window Advertisements