Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EE javac

 
Alex Cholakis
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I need to set an Environmental Variable:
JAVA_HOME = C:\Program Files\Sun\SDK\jdk\bin

I want to do this from the window interface, so I went into my Environmental Variables. There are two windows:
"User variables for Computer" and "System variables"
1) Where do I place this variable?

After I create and give the variable a value.
2) How do I add it to the "System variables" "PATH" variable?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JAVA_HOME should be the root of the installation, not the bin directory.

It doesn't matter if you put it in user or system variables.

You set the path in much the same way; under the computer's properties.

You might want to check out some basic Windows documentation for things like this, since it's not really Java-related per se.
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alex Cholakis wrote:1) Where do I place this variable?

User variables if you want them for only you, system variables if you want them for everyone.

2) How do I add it to the "System variables" "PATH" variable?

1) double click on PATH
2) copy the value to a text editor
3) put word wrap on
4) add %JAVA_HOME%\bin to your path
4a) put %JAVA_HOME%\bin; at the start, or
4b) put ;%JAVA_HOME%\bin at the end, or
4c) put ;%JAVA_HOME%\bin just after some other path (but before its following ;)
5) copy the line back to the value field
6) press OK

Steps 2, 3 and 5 are there because it's just not useful editing such a long string in such a small field.

Here's a filtered part of my PATH:
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\Program Files\Support Tools\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Common Files\GTK\2.0\bin

Note the position of both %JAVA_HOME%\bin and %ANT_HOME%\bin - just after the Windows system paths, to make sure that no other javac will be used because its path is found first.
 
Alex Cholakis
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi: SUCCESS!

Previously, I used the SE edition of Java. This is the first time using EE or Enterprise edition. So, there was alittle difference here. I've been experimenting and emailing over different list. This is my first time on this Forum and it is a super resource.

Rob, what I did was to go into my Environmental Variables and into the System variables window. I set a variable JAVA_HOME with the value "C:\Program Files\Sun\SDK\jdk" and then placed this in the Path as ;%JAVA_HOME%\bin at the end.

Your explanation was super and I learned the "%" is part the windows operating system symbols.

And David, if you hava a link about learning more about the windows symbols, it be much appreciated.

Thank you both for taking the time to respond. You made my day.

Best,
Alex
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic