2

Hi was trying to run sbt update comand in cygwin and i get the error "No java installation was detected" even tough i have java installed .

My java in present in C:\Program Files\Java

My sbt is installed in C:\Program Files(x86)\sbt

I found one similar question over here in StackOverflow but i couldnt resolve it.

Any help?

Thanks , Vishesh

Marko Bonaci
  • 5,622
  • 2
  • 34
  • 55
Vishesh
  • 3,599
  • 4
  • 22
  • 36

2 Answers2

1

Set your JAVA_HOME environment variable to point to where your JDK is For eg:

JAVA_HOME=C:\Program Files\Java\jdk1.7.0_79
Ajay Padala
  • 2,371
  • 16
  • 13
1

Follow this steps:

  • Go to the Control Panel
  • Select the System icon
  • In the left column select Advanced System Settings
  • In the tabs select Advanced and then Environmental Variables...
  • In the lower part click New and set

Variable Name: JAVA_HOME Variable Value: C:\Program Files\Java\<JAVA_FOLDER>

Change the <JAVA_FOLDER> with the one you're using

Marcx
  • 6,806
  • 5
  • 46
  • 69
  • 1
    To skip steps 1 and 2, I just use Start Menu's search functionality. It usual the first one selected when I type `edit s`(ystem) – SGM1 Jan 19 '16 at 16:39
  • JDK location is in PATH, and JAVA_HOME is set correctly. Problem persists. Also DOS utility app findstr.exe is found. It appear SBT shell ignores the PATH env variable – kevin aubuchon Dec 10 '19 at 01:50