Search code examples
javalinuxbashcygwin

how do i set JAVA_HOME in bash?


my host system is windows 7

I am trying to get this to work in CYGWIN.

I need to set an environment variable called JAVA_HOME to be c/program files (x86)/java/jre7

here's what i tried:

$myjava=cat c/program\ files\ \(x86\)/java/jre7
export JAVA_HOME=myjava

but i am getting:

line 9: c/program files (x86)/java/jre7: No such file or directory Error: JAVA_HOME is not set.

what am i doing wrong?


Solution

  • export JAVA_HOME=c:/program\ files\ \(x86\)/java/jre7