I am trying to separate the website name from the URL. For example - if the URL is www.google.com, the output should be \"google\". I tried the below code and everything wor
I've had the same problem, but after installing Java SE Development Kit 8u191 and selecting java-8-jdk with:
sudo update-alternatives --config java
it dissappered.
Just to make @Anubhav Sarangi comment to this question an answer: I had the same problem. Initially, I installed Java SE 10.0.1. But got similar error. Following @Anubhav Sarangi suggestion, I downloaded and installed Java SE Development Kit 8u171 which has jdk 1.8 and the problem solved.