Comments (7)
Personally, I've added the following lines to my ~/.bash_profile
:
# Set java version
# https://www.kevinhooke.com/2017/10/05/switching-java-versions-on-mac-os/
alias j11="export JAVA_HOME=`/usr/libexec/java_home -v 11`"
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`"
j8
My default jdk is jdk8. When I want to use jdk11, I type j11
and I can come back to jdk8 with j8
.
Read https://www.kevinhooke.com/2017/10/05/switching-java-versions-on-mac-os/ for details.
from homebrew-openjdk.
It would be really great if this was part of the readme.
from homebrew-openjdk.
It would be really great if this was part of the readme.
@SPConrad - Can you submit a PR for that?
from homebrew-openjdk.
@karianna Raised a PR. Could you please review #314 ?
Thank you!
from homebrew-openjdk.
https://github.com/AdoptOpenJDK/homebrew-openjdk
Personally, I've added the following lines to my
~/.bash_profile
:# Set java version # https://www.kevinhooke.com/2017/10/05/switching-java-versions-on-mac-os/ alias j11="export JAVA_HOME=`/usr/libexec/java_home -v 11`" alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`" j8
My default jdk is jdk8. When I want to use jdk11, I type
j11
and I can come back to jdk8 withj8
.Read https://www.kevinhooke.com/2017/10/05/switching-java-versions-on-mac-os/ for details.
More programmatically from the AdoptOpenJDK repository:
jdk() {
version=$1
export JAVA_HOME=$(/usr/libexec/java_home -v"$version");
java -version
}
from homebrew-openjdk.
After upgrading to openjdk version "14.0.1" 2020-04-14. above alias is not working
from homebrew-openjdk.
@arunsval Please open a new issue, explain what you did, what the desired outcome was and what the actual outcome is. Show the full output of your comand line.
from homebrew-openjdk.
Related Issues (20)
- Provide native builds for M1 Apple Silicon (ARM) Macs in Homebrew HOT 1
- adoptopenjdk cask does not exist HOT 3
- auto_updater.sh github action having errors
- Do you wish to rename this formula to temurin? HOT 2
- Support for OpenJDK from Adoptium HOT 3
- JDK 17 support HOT 1
- OpenJDK 17? HOT 4
- Is there a way to install new minor update of the jdk11? HOT 11
- Homebrew openjdk install issue HOT 3
- adoptopenjdk/openjdk warming HOT 1
- reporting WARNING: `appcast` stanza is deprecated! --> use `livecheck` stanza instead HOT 1
- Calling the `appcast` stanza is deprecated! HOT 1
- Unable to uninstall due to `Cask 'adoptopenjdk8' is unreadable` HOT 6
- Warning: Calling the `appcast` stanza is deprecated! Use the `livecheck` stanza instead. HOT 2
- Warning: Calling the appcast stanza is deprecated! HOT 3
- Warning: Calling the `appcast` stanza is deprecated! Use the `livecheck` stanza instead
- Calling the `appcast` stanza is deprecated! Use the `livecheck` stanza instead. HOT 2
- `appcast` stanza is deprecated - use `livecheck` instead HOT 1
- PS install/uninstall has Error: Cask 'adoptopenjdk8' definition is invalid: 'appcast' stanza HOT 1
- adoptopenjdk-jre HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew-openjdk.