Help with nano /etc/environment

Asked by Luis M.Jacinto

Following java installation come to this instruction.
Paste the below variable on the file:

To define the enviroment variable:
sudo nano /etc/environment
Paste the below variable on the file:
/etc/environment

JAVA_HOME=/opt/jdk/jdk1.8.0_251
JRE_HOME=/opt/jdk/jdk1.8.0_251/jre
After paste the two lines what I should do to carry on.
Thank you for the information

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Which instruction are you following? They for sure are not from Ubuntu, because software that is provided in Ubuntu-packages does not need manual additional settings like the one that you mention and Ubuntu does not put the java files below /opt/

When you are running an Ubuntu system, you better install additional software from the Ubuntu repositories and not from foreign sources, whenever the software is available in Ubuntu.

I recommend that you undo (respectively delete) whatever you have done for java and go back to the Ubuntu-provided packages:

sudo apt-get install openjdk-8-jre openjdk-8-jdk

Revision history for this message
Luis M.Jacinto (ljacinto) said :
#2

I follow your instruction and install openjdk-8-jre openjdk-8-jdk.
After searching for Ubuntu POS applications found there is non but there is open source software
from Sourceforge for Linux I choose uniCenta POS there is step-by-step instructions to install in Ubuntu 64-bit Desktop Edition and it explains to install “Java SE Runtime Environment 8u20x” to successfully run, the right package is jre-8u201-linux-x64.tar.gz.
My idea is to install on old Lenovo laptop but before that want to test it on my desktop.
My question is this if carryon with uniCenta installation is it going to corrupt Ubuntu?
Or can I try the software installation and then revert java back,
I need this information before I continue.
Thank you

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

To save the file in nano, press CTRL + O
There may be a prompt at the bottom for the filename. The default (if memory serves) is the file you opened so press ENTER then press CTRL + X to exit.

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#4

“Java SE Runtime Environment 8u20x” is outdated.
Current version is 8u362.

uniCenta POS is foreign software from outside Ubuntu. I do not know anything about it, and I doubt that anybody else who answers questions here can assess the potential impact of trying to install that software on an Ubuntu system.

If you need support for that foreign software, then you have to ask at its source, probably https://unicenta.com/pages/ and https://unicenta.com/unicenta-opos-videos/ and https://unicenta.com/community/

Revision history for this message
Luis M.Jacinto (ljacinto) said :
#5

Thanks Manfred Hampl, that solved my question.