To expand RINPn's functionality, let's implement plug-ins in the Java programming language.
You can implement new built-in variables and functions using the Java™ programming language. Within RINPn and Vnano, we refer to Java™ programs that provide built-in functions or variables as "plugins."
Utilizing Java offers advanced functionality compared to defining variables/functions in script code (as in step-4).
However, implementing code in Java requires the Java Development Kit (JDK) to compile the code. We assume that JDK is installed on your PC and that the "javac" command is available. For installation details, you can search online with keywords like "OpenJDK install (your OS name)".
To use plugins with RINPn, place them in the "plugin" folder of RINPn. A simple example of a plugin, "ExamplePlugin.java," is located in this folder:
This plugin is compiled by default and set to be loaded (details on setting this up will be explained later).
The variable "pivar" and the method "pifun(arg)" can be used as built-in variables/functions in the calculator (see Step-1 and 2) and in script code (see Steps-3 and 4).
For example:
When you modify a plugin's code, it needs to be recompiled as follows:
Some compiled class files of special plugin interfaces (XFCI1, XNCI1, etc.) supported by the Vnano Engine are included in the "plugin/org/vcssl/connect" folder. You can import these interfaces in your plugin and compile them similarly.
To add a new plugin, place it in the "plugin" folder and compile it. Then, add the path of the compiled class file to the "VnanoPluginList.txt" file within the "plugin" folder. All plugins listed in "VnanoPluginList.txt" will be loaded by RINPn.
In the "plugin/org/vcssl/nano/plugin" folder, "Vnano Standard Plugins," which provide basic features like math and utility functions, are bundled and loaded by default (as specified in "VnanoPluginList.txt"). You can use their functions and variables by default.
For a comprehensive list and detailed specifications of Vnano Standard Plugins, visit the "Vnano Standard Plugins" page on the official Vnano website.
Additionally, the RINPn frequently uses functions/variables, and simplified explanations of these are listed in the section: Appendix - List of Built-in Functions/Variables..