Where is JAVA HOME on macOS Mojave 10 14 to Lion 10 7

0 votes

Java is an optional package on the latest versions of macOS.

Yet once installed it appears like the JAVA_HOME environment variable is not set properly.

Dec 4, 2018 in Java by Sushmita
• 6,920 points
2,582 views

1 answer to this question.

0 votes
export JAVA_HOME="$(/usr/libexec/java_home -v 1.6)"
or
export JAVA_HOME="$(/usr/libexec/java_home -v 1.7)"
or
export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
answered Dec 4, 2018 by Daisy
• 8,140 points

Related Questions In Java

0 votes
1 answer

Can i know where is java logs on centos 7?

Hey! Have you checked <user.home>/.java/deployment/log ? READ MORE

answered Oct 20, 2020 in Java by Kiya
2,660 views
0 votes
1 answer

Is it possible to run a java program from command line on windows?How?

  Let's say your file is in C:\myprogram\ Run ...READ MORE

answered Apr 18, 2018 in Java by sophia
• 1,400 points
2,682 views
0 votes
2 answers

When I am running eclispe on my computer it is throwing error. How to resolve it?

If you have downloaded the 64 bit ...READ MORE

answered Dec 10, 2018 in Java by Sushmita
• 6,920 points
1,039 views
0 votes
1 answer

How to install and configure JDK8 on Windows 10

Hey @Henna, Go to this page  Accept the license ...READ MORE

answered Feb 28, 2019 in Java by Kalgi
1,253 views
0 votes
1 answer

How to install Java 8 on Mac

Oracle has a poor record for making ...READ MORE

answered Dec 23, 2020 in Java by Gitika
• 65,770 points
2,304 views
0 votes
0 answers

How to set JAVA_HOME environment variable on Mac OS X 10.9?

I just purchased a brand new MacBook ...READ MORE

Sep 22, 2022 in Java-Script by Tejashwini
• 3,820 points
741 views
0 votes
1 answer

How do I install Java on Mac OSX allowing version switching?

With Homebrew and Jenv: Assumption: You have a ...READ MORE

answered Jan 3, 2023 in DevOps on Cloud by David
• 220 points
593 views
+5 votes
4 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,450 points

edited Nov 7, 2018 by Omkar 81,223 views
+4 votes
3 answers

What are the steps to set Java_home on Windows?

Set Java Home JAVA_HOME = C:\Program Files\Java\jdk1.7.0 [Location ...READ MORE

answered Sep 18, 2018 in Java by Sushmita
• 6,920 points
2,271 views
+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,220 points
3,579 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP