I'm trying to generate a libgdx project using "project generator" but it shows this error:
ERROR: JAVA_HOME is set to an invalid directory: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
But I have installed the JAVA 1.8, using the terminal command it shows this:
$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
So how to setup the right jvm, someone have any suggestion or the solution to correct this issue?