0

Appologies for asking new question but I am not allowed to comment here.

I need to install Java sdk, and then create an enviroment variable JAVA_HOME pointing to the directory of the java compiler (javac).

I installed java sdl, but installation is not under /Library/Java?... but

here: /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/javac

I need to later on install hadoop and create a new enviroment variable pointing to the location of /lib/tools.jar in my java installation, but this is not to be found in my mac. I searced google and came across link above, but I wasn't allowed to comment.

All solutions suggest that Java should be installed in Library, but this is not my case. I do not know how to delete JAva sdk and try to reinstall it, since oracle's instructions take into account proper installation of java sdk.

Any idea how to proper uninstall/install sdk in order to find tools.jar?

I have created a JAVA_HOME enviroment variable as bellow:

javac -version

javac 1.8.0_121

which java

/usr/bin/java

my enviroment variable was created using: export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

Community
  • 1
  • 1
Fierce82
  • 408
  • 5
  • 17

1 Answers1

1

I was able to properly install it using homebrew (credits to this answer)

brew update
brew cask install java

Now I can find my Java folder under Library, and consequently locate lib/tools.jar

Nevertheless I did not remove previous install, so I am not sure what this may cause in the near future.

Community
  • 1
  • 1
Fierce82
  • 408
  • 5
  • 17