0

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 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 –  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 –  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. –  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 00:50
  • @AndrewB Do you what know the solution to this question was? I misspelled a word. I did everything other than that right. I did my research, I simply made a human mistake. –  May 24 '13 at 02:05
  • @OWiz To err is human, and we're all guilty of a fat finger now and then. To put my point more gracefully, without a certain level of assumed minimum experience you're going to have a great deal of difficulty on this site. If it appears that you aren't making the effort to help yourself (whether you realize it or not), the number of people willing to contribute usefully will be very low. – Andrew B Jun 06 '13 at 14:17

2 Answers2

1

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

mdpc
  • 11,698
  • 28
  • 51
  • 65
  • I fixed that, but I still get the same error message. should I have a space between the `=` and the `/cydrive`? –  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 –  May 23 '13 at 21:28
  • I solved it. I misspelled a word in my .bash_profile –  May 23 '13 at 22:27
1

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