[ Prev | Index | Next ]
Japanese English

Step 2 - How to Use in CUI Mode
(on the Command-Line Terminal)

In this section, Let's try to use another mode of the RINPn: CUI mode. In the CUI mode, you can take calculations on the command-line terminal, whithout launching the calculator window.

How to Calculate in CUI Mode (Without Any Settings)

To use the CUI mode without any additional settings, execute the "RINPn.jar" with passing an expression as a command-line argument as follows:

cd (The folder of the RINPn)

java -jar RINPn.jar   "(1 + 2 ) / 3 - 4 + 5"
(Result) 2

java -jar RINPn.jar   "sqrt ( sin( PI / 2 ) + 1 )"
(Result) 1.414213562

As the above, we can take the same calculation as the example we took in GUI mode, without launching the calculator window.

How to Calculate in CUI Mode (With The Path-Setting)

It may be hassle to input the above long command-line with setting the current directory to the folder of the RINPn every time. To make it easy, it is helpful to register the path of "bin" folder of the RINPn to the environment variable "PATH" (or "Path") of your OS. If you do it, after then, wherever the current directory is, you can take calculations more simply by using "rinpn" command as follows:

rinpn "(1 + 2 ) / 3 - 4 + 5"
(Result) 2

rinpn "sqrt ( sin( PI / 2 ) + 1 )"
(Result) 1.414213562

How to modify the environment variable PATH/Path depends on the OS you are using. For details, please search on the web with keywords "how to set path (+ the name OS you are using)" and so on. Please note that, if you deleted the current value of the environment variable "PATH"/"Path" by mistake, or if you modify it to invalid value, serious problems may occurred on your PC. Be careful when you are modifying it. If you have never modified it, and if you can ask to someone for helping/supervising you, we recommend to ask.

Also, on the Linux® and so on, an error message related with permissions may occur at the first time you use "rinpn" command. In that case, add a permission as follows:

cd (The folder of the RINPn)/bin
chmod +x rinpn     (or, if necessary:  sudo chmod +x rinpn )
- 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
Announcementi Twitter j