0 votes
asked in JAVA by (8.2k points)
Hi All,

  Need quick help to set the java path in mac terminal.

1 Answer

0 votes
answered by

Setting the JDK Path on Mac OS X or Linux for Your User

  1. Login and open a Terminal or command line window
  2. Open the ~/.bash_profile using vi or another command-line editor such as Pico. For example enter vi ~/.bash_profile.
  3. Set your PATH to include the JDK sub-folder named java. For example: export PATH=$PATH:/usr/java/jdk1.6.0_10/bin
  4. Save the changes and either logout and then back in, or, to active the new settings enter source ~/.bash_profile