G
G
Good Man2017-06-21 12:43:38
Java
Good Man, 2017-06-21 12:43:38

Installing and using java7 and java8 on os x?

Good afternoon!
For projects, java 1.8 is used as a back-end.
For a new project, java 1.7 was needed, because java code under 1.8 does not compile The
question is, how to put the second Java version 1.7 on OS X and how to switch between them?
UPD: found a solution in this article - davidcai.github.io/blog/posts/install-multiple-jdk...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Semchenko, 2017-06-21
@0xcffaedfe

Yes, my God.
alias setJdk6='export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)'
alias setJdk7='export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)'
alias setJdk8='export JAVA_HOME=$(/ usr/libexec/java_home -v 1.8)'
The new project required java 1.7 because java code under 1.8 won't compile! Nonsense!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question