Search code examples
cygwinred5

Red5 can't locate Java on Cygwin


I'm setting up a Red5 server on Cygwin

I get this

/usr/share/red5$ sh 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
export PATH=$PATH:$EMACS_HOME/bin:$JAVA_HOME/bin
export PATH=$PATH:$EMACS_HOME/bin

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" )
export PATH=$PATH:$EMACS_HOME/bin:$JAVA_HOME/bin
export PATH=$PATH:$EMACS_HOME/bin

And I get this error

cygpath: cannot create short name of D:\cygwin\cydrive\c\Program Files\Java\jdk1.6.0_32\

Solution

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

    I just misspelled cydrive, when it should have been cygdrive.