3

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......

setha va
  • 51
  • 1
  • 1
  • 3

2 Answers2

2

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

Zoe
  • 27,060
  • 21
  • 118
  • 148
Max Robbertze
  • 406
  • 4
  • 11
  • While this code may solve the question, [including an explanation](//meta.stackexchange.com/q/114762) of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please [edit] your answer to add explanations and give an indication of what limitations and assumptions apply. – double-beep Mar 29 '19 at 20:36
0

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