This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Mac OS and the fly likes Setting the Path on Macs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Setting the Path on Macs" Watch "Setting the Path on Macs" New topic
Author

Setting the Path on Macs

Kira Summerton
Greenhorn

Joined: May 31, 2011
Posts: 1
Okay, so i am really new to Java. I am teaching myself and i cannot figure out how to set my PATH. I am using Head First Java and would really appreciate some help on where and how to insert the % javac on my Mac.

Thanks!
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11437
    
  85

You should not need to do anything manually - Macintosh OS/X comes with Java pre-installed.

Open up the Terminal application, and type java -version You should see a response that indicates what version of Java is running by default on your Mac.


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

But for future reference for setting OS environment variables. (this includes PATH)

Mac OS is based on Unix, so the way you do environment variables are different from windows. You can use your .profile file in your user's home directory, or you can create them directly on the command line for the length that the terminal window is open.

In all cases it is a matter or using EXPORT

EXPORT my_var=someValue

for example this is part of my .profile file



Hope that helps

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting the Path on Macs