[ Prev | Index | Next ]
Japanese English

Step 5 - Implement Functions/Variables in Java®
(Plug-in Development)

You can implement new built-in variables and function in the Java® programming language. On the RINPn and the Vnano, we refer a Java® program to provide built-in functions/variables as "plug-in".

In this way, compared to defining variables/functions as script code (in the step-4), high-functionality of Java® might be the great merit.

On the other hand, it requres Java® Development Kit (JDK) to compile implemented code. Here we assume that JDK(s) is installed in your PC and "javac" command is available on it. For details of how to install a JDK, as an example, search on the web with keywords "OpenJDK   install   (name of your OS)" and so on.

How to Use Plug-Ins

For using on the RINPn, plug-ins should be put in the "plugin" folder of the RINPn. In the folder, a simple example of a plug-in "ExamplePlugin.java" exists:

(The content of "ExamplePlugin.java" in "plugin" folder)

public class ExamplePlugin {

    public double pivar = 1.0;

    public double pifun(double arg) {
        return arg * 2.0;

This plug-in is compiled by default, and is set to be loaded (how we set it will be explained later).

The field "pivar" and the method "pifun(arg)" are available as a built-in variable/function inputted to the calculator (see Step-1 and Step-2), and in the script code (see step-3 and Step-4).

For example:

1 + pivar




How to Compile Plug-ins

When you modify code of the plug-in, it requires to be re-compiled as follows:

cd (folder of the RINPn)
javac ExamplePlugin.vnano

By the way, some compiled class files of special plug-in-interfaces (XFCI1, XNCI1, and so on) supported by the Vnano Engine are bundled in the "plugin/org/vcssl/connect" folder. If you want, you can import them from your plug-in (see "Plugin Development" section in the document of the Vnano) and you can compile it in the same way as the above example.

How to Add New Plug-ins

If you want to add a new plug-in, put it in the "plugin" folder and compile it. Then, describe (append) the path of the compiled class file into the content of the text file "VnanoPluginList.txt" in "plugin" folder. All plug-ins specified in "VnanoPluginList.txt" will be loaded by the RINPn.

Vnano Standard Plug-ins

In "plugin/org/vcssl/nano/plugin" folder, "Vnano Standard Plug-ins" which provide basic features (math functions, utility functions, and so on) are bundled. They will be loaded by default (specified in "VnanoPluginList.txt"), so you can use their functions/variables by default.

For browsing the full list and detailed specification documents of Vnano Standard Plug-ins, see "Vnano Standard Plug-ins" page in the official website of the Vnano.

Also, frequently-used functions/variables on the RINPn and simplified explanations of them are listed in the page: Appendix - List of Built-in Functions/Variables.

- Trademarks/Credits -
  • Oracle and Java are registered trademarks of Oracle and/or its affiliates.
  • Microsoft Windows is either a registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
  • Linux is a trademark of linus torvalds in the United States and/or other countries.
  • Other names may be either a registered trademarks or trademarks of their respective owners.

Sponsored Link

Japanese English
Index of this category

RINEARN Graph 3D Updated and Next Version (Ver.6) Development Has Begun!
2023/09/04 - We have released RINEARN Graph 3D Ver.5.6.34. In addition, we have initiated the development of the next major version, Ver.6! Introducing the details.

Commitment to Significantly Expand English Documentation with AI Assistance - Presenting a Behind-the-Scenes Look at the Actual Workflow
2023/05/28 - We have decided to expand our English documentation by leveraging AI technologies such as ChatGPT. We will provide a detailed explanation of our initiative.

Update to RINEARN Graph 3D: Enhanced API-related Features and More
2023/05/18 - We recently released the latest version of RINEARN Graph 3D, Ver.5.6.32. Explains the details of this update.

Code Archive
Circular Wave Animation

Draws the circular wave as 3D animation, under the specified wave parameters.
Sine Wave Animation

Draws the sine wave as animation, under the specified wave parameters.
Tool For Converting Units of Angles: Degrees and Radians

A GUI tool for converting the angle in degrees into radians, or radians into degrees.
Fizz Buzz Program

A program printing the correct result of Fizz Buzz game.
Vnano | Solve The Lorenz Equations Numerically

Solve the Lorenz equations, and output data to plot the solution curve (well-known as the "Lorenz Attractor") on a 3D graph.
» More