1

Now I want to use git bash to run <a href="https://github.com/tinkerpop/gremlin/wiki/Getting-Started">gremlin</a>. However, when I ran gremlin.sh, it returned java command cannot be found. I can work quite well with java using eclipse on my windows laptop. So I think the building path may be the problem. I followed this answer. But it did not work.

This is my git bash window

Thanks.

I have solved this problem. This link is very useful and Java needs to be installed. Hope can help others.

Community
  • 1
  • 1
  • 1
    Add java to the path variable, note sometimes you will need to restart windows after you do this for the changes to take effect. If you don't restart at least restart the terminal. Note this will be a duplicate question probably. – Derrops May 16 '16 at 23:04
  • Probably just need to restart the terminal. Once you do so, `echo $PATH` to make sure the jdk/jre bin directories are on your path as expected. – Chris K May 16 '16 at 23:08
  • @Snickers3192, I have added java to path variable before and I can use java in eclipse. –  May 16 '16 at 23:09
  • Ah, you seem to be in a container. Your image needs to embed Java if you want to use it. – Alexandre FILLATRE May 16 '16 at 23:12
  • Is that a vagrant generated VM? In that case, you will need to install java inside it. – Federico Nafria May 16 '16 at 23:31
  • How can I embed Java in it?@AlexandreFILLATRE –  May 17 '16 at 00:30
  • @FedericoNafria, yes, it is vagrant generated VM. How can I install java inside it? Thanks –  May 17 '16 at 00:31

1 Answers1

2

Be sure to have %JAVA_HOME%/bin to your Windows PATH variable. %JAVA_HOME% should point to your JRE or JDK installation.

Alexandre FILLATRE
  • 1,305
  • 11
  • 20
  • Hi Alexandre, I have set the java home to the Windows variable and I can use java in both eclipse and windows cmd –  May 16 '16 at 23:08