[ Prev | Index | Next ]
Japanese English

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

In this page, to expand the feature of RINPn, implement plug-ins in Java programming language.

Sponsored Link

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

Software Updates: Command Expansion in RINEARN Graph, and English Support in VCSSL
2024/02/05 - We updated our apps. This updates include "Enhancing the Command-Line Features of RINEARN Graph" and "Adding English Support to VCSSL." Delves into each of them!

Inside the Repetitive Execution Speedup Impremented in Vnano Ver.1.1
2024/01/17 - Delves into the update in Vnano 1.1 from a developer's viewpoint, providing detailed insights into the specific improvements made to the internal structure of the script engine.

Scripting Engine Vnano Ver.1.1 Released: Dramatic Speed Improvement for Repetitive Executions of the Same Content
2023/12/22 - Released the Vnano script engine Ver.1.1. In this version, we've made significant enhancements in processing speed by reducing the overhead of handling requests. Explains the details.

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