25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix A ■ Installing Tools<br />

Figure A-15. Name and Password Dialog for the Installer<br />

After installing, it is necessary to make sure the JVM is accessible in the command line. So it is necessary to set some<br />

environment variables, and you can set them in your .bash_profile or .bash_rc files in your home directory.<br />

By default, the installer puts the JDK in the /Library/Java/JavaVirtualMachines path.<br />

So, the values will be<br />

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home<br />

export PATH=$JAVA_HOME/bin:$PATH<br />

Then you can open a terminal and test Java by executing the following:<br />

$ echo $JAVA_HOME<br />

/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home<br />

$ java –version<br />

java version "1.8.0_05"<br />

Java(TM) SE Runtime Environment (build 1.8.0_05-b13)<br />

Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)<br />

Figure A-16 shows the result of executing the above commands. Now you are ready to use Java, either a Windows<br />

or Mac OS X version. If you have a Linux box, you can download the Linux version and install it on /usr/lib/jvm or<br />

even in your home folder; just make sure to set up the JAVA_HOME and PATH environment variables.<br />

Figure A-16. Mac OSX Terminal<br />

300

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!