4

I ran echo %JAVA_HOME% to find my path. I know it is the wrong path but I am not sure how to fix it. Any help would be appreciated.

C:\Users\Cynthia>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_33\C:\Program Files\Java\jdk1.0.60_33\C:\Program Files\Java\jdk1.0.60_33\%JAVA_HOME%\bin\bin\bin

C:\Users\Cynthia>
Matt Ball
  • 354,903
  • 100
  • 647
  • 710
slickery89
  • 41
  • 1
  • 1
  • 3

1 Answers1

4

On windows, right-click "my computer" and choose "properties.
Go to: "advanced system settings" and then to "environment variables":

enter image description here

Then go over the variables and set %JAVA_HOME%:

enter image description here

like this:

enter image description here

Here's another helpful link

Nir Alfasi
  • 53,191
  • 11
  • 86
  • 129
  • @alfasin or davidfransis I'm confused again? Do not put the % in the user variable or the system variable. How do I attach a file for you to see mmy variables? – slickery89 Jul 11 '12 at 22:55
  • in the question body, use the image icon in order to upload a picture. – Nir Alfasi Jul 11 '12 at 23:08
  • I made the changes but in the image you see that it caznnot find JAVA_HOME I need this for RED5 – slickery89 Jul 11 '12 at 23:17
  • Try adding the path to "jave home" in the `PATH` variable (separated by semicolon `;`) – Nir Alfasi Jul 11 '12 at 23:19
  • This is my path now C:\Program Files\Java\jdk1.6.0_33\bin\C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\ANT\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\QuickTime\QTSystem\ – slickery89 Jul 11 '12 at 23:34
  • looks fine, I would add `C:\Program Files\Java\jdk1.6.0_33` (without the `bin`) too. – Nir Alfasi Jul 11 '12 at 23:38
  • I added as you suggested, on my cmd line I type %JAVA_HOME% C:\Program is not recognized as an internal or external command, operable program or batch file or JAVA_HOME get returned 'JAVA_HOME is not recognized as an internal or external command, operable program or batch file. Please advise – slickery89 Jul 11 '12 at 23:49
  • @slickery89 create a new file in notepad: line 1 `@ECHO off` and line 2: `echo %JAVA_HOME%` save it as 1.bat and run it from command prompt – Nir Alfasi Jul 12 '12 at 00:08
  • results When I execute command prompt I'm presented with C:\Users\Cynthia doesn't recognize my 1.bat then I cd C:\1.bat I get C:\Program Files\Java – slickery89 Jul 12 '12 at 00:22
  • run `cd c:` and only then run `1.bat` – Nir Alfasi Jul 12 '12 at 00:25
  • cd c: takes me to C:\Users\Cynthia then run 1.bat not recognized – slickery89 Jul 12 '12 at 00:32
  • @slickery89 run `cd c:\ ` and then `1.bat` – Nir Alfasi Jul 12 '12 at 20:29
  • @alfasin I cd C:/ then at C:\1.bat then it returns on the next line C:\Program Files\Java – slickery89 Jul 12 '12 at 22:48
  • right, and that shows you that JAVA_HOME variable is defined! – Nir Alfasi Jul 12 '12 at 23:12
  • btw, if you manually run from prompt: `echo %JAVA_HOME%` you should also get: `C:\Program Files\Java` – Nir Alfasi Jul 12 '12 at 23:13