'Error in utilising schematool to Metastore

I'm trying to initialize hive and I'm getting this error when I try to use the schematool utility to initialize the Metastore by running the following command:

user@systemname /cygdrive/c/hive-3.1.2/bin
$ ./schematool -initSchema -dbType derby
ERROR: C:\Java\jdk1.8.0_161\bin/bin/java is not executable.

tap on link to see the screenschot

I think the reason for this may be that the directory name of hadoop is different than mentioned in some cygwin64/derby/hive configuration files.

Can someone please help me solve this error???



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source