Take the 2-minute tour ×
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 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\
share|improve this question
add comment

1 Answer

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 –  coderCurtis May 23 '13 at 22:22
add comment

Your Answer

 
discard

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.