Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm setting up a Red5 server on Cygwin

I get this

/usr/share/red5$ sh
Running on  CYGWIN_NT-6.1-WOW64
Unable to locate Java. Please set JAVA_HOME environment variable.

However, I can also do this: javac -version and get javac 1.7.0, so I know that's installed, at least.

I can also go into the emacs .bash_profile and see that I've added this to the bottom:

export PS1='\w\$ '
export EMACS_HOME=~/emacs-22.3
export JAVA_HOME =/cydrive/c/Program\ Files/Java/jdk1.6.0_32

So what's missing?

I edited .bash_profile to be this:

export PS1='\w\$ '
export EMACS_HOME=~/emacs-22.3
export JAVA_HOME=/cydrive/c/Program\ Files/Java/jdk1.6.0_32/
export JAVA_HOME=$( cygpath -d "$JAVA_HOME" )

And I get this error

cygpath: cannot create short name of D:\cygwin\cydrive\c\Program Files\Java\jdk1.6.0_32\
share|improve this question

1 Answer 1

up vote 1 down vote accepted

On mine it shows cygdrive. I think you are missing "g" on cygdrive:

export JAVA_HOME=/cygdrive/c/Program\ Files/Java/jdk1.6.0_32/

[edit: added the g in cygdrive path still missing]

share|improve this answer
Yep. That was it. Now I just get a different error. related to some Java in Red5. Thanks – Houseman May 23 '13 at 22:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.