setha va
setha va

Reputation: 51

Problem with Update-alternatives for java

I try to setup nativescript-vue on linux by following steps on nativescript website. when I use this command

sudo update-alternatives --config java

but have an error

update-alternatives: error: no alternatives for java

Please tell me how to fix this problem......

Upvotes: 3

Views: 14058

Answers (3)

Aliak Roi
Aliak Roi

Reputation: 66

Try the following to manually select a desired java version.

sudo update-alternatives --config java

Upvotes: 0

Max Robbertze
Max Robbertze

Reputation: 401

Try

sudo update-alternatives --install /usr/bin/java java  path_to_java 1

In my case the path was /usr/lib/jvm/java-8-openjdk-amd64

Upvotes: 3

Idowu Olawoye
Idowu Olawoye

Reputation: 3

Do you have java installed? Check if you do by running java -version in the command line/terminal

Upvotes: 0

Related Questions