A step-by-step guide on how to access and edit the bash profile on a Mac.
Learn how to edit a bash profile and document the process as a tutorial, as tutorials on this topic do not appear to be very plentiful.
Steps 1 to 2 relate to identifying the available Java versions. Updating the bash profile starts at step 3.
- How to access and edit a bash profile
- How to update the default path for Java
Step 1: Identify Current Default Java Version
Step 2: Identify All Available Versions of Java
Step 3: Access Bash Profile
The above will open the bash profile with the Mac TextEdit app.
Step 4: Editing Bash Profile
In the opened text document, add the required export path for Java as follows.
Step 5: Confirm the Updates
The above should return the version of Java from the newly assigned Java home path.