• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Setting the Path on Macs

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ranger
Posts: 17344
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
yeah, but ... what would PIE do? Especially concerning this tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!