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

So what's missing?

  • I have yet to ask a question that didn't get voted down. Either you people are really harsh, someone hates me, or I just don't ask good questions – Houseman May 23 '13 at 21:28
  • 1
    If someone could leave feedback on what I did wrong, or what I can do to improve, or why this isn't a good/topical question, that'd be great. But downvoting and running is just frustrating, especially since it's happened to me three times in a row – Houseman May 23 '13 at 22:02
  • Question seems fine to me. Don't read too much into the downvote, esp. if they didn't leave a comment. I think they might not like the question b/c it's a little vague/broad..just a guess. – slm May 23 '13 at 22:53
  • Oh, great, now I got banned from asking anything else, because of my "reputation for asking extremely bad questions". Welp, you guys win. May your site be better because of absence, I guess. – Houseman May 23 '13 at 23:06
  • If you mouse over the downvote button for a question, you will see the following phrase: This question does not show any research effort. No attempt was made to display the current value of the variable in memory, so yeah, a downvote is in fact appropriate here. If you pick up a beginner's book on Unix administration and come back, you'll probably know enough to do better in the community. It may seem mean to you, but this is the technical equivalent of "how do I open a pickle jar". – Andrew B May 24 '13 at 0:50

You have a SPACE character between the JAVA_HOME and the =. Thus the variable never properly gets defined and exported.

  • I fixed that, but I still get the same error message. should I have a space between the = and the /cydrive? – Houseman May 23 '13 at 21:21
  • Either logout/login or do a . bash_profile to read in the variables to your current shell. Just putting things in .bash_profile does not cause them to get re-read. – mdpc May 23 '13 at 21:26
  • how do I do a .bash_profile? That command doesn't seem to do anything. Also, I tried relogging, insofar as I closed and reopened cygwin – Houseman May 23 '13 at 21:28
  • I solved it. I misspelled a word in my .bash_profile – Houseman May 23 '13 at 22:27

I found it.

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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