Skip to content

Instantly share code, notes, and snippets.


Cagatay Kavukcuoglu tinkerware

View GitHub Profile
tinkerware /
Last active March 20, 2023 13:22
Maintaining Java Installs on macOS Using Homebrew Cask

Maintaining Java Installs on macOS Using Homebrew Cask

Recently, I upgraded my MacBook Pro from a old, trusty Yosemite to Sierra, and reluctantly had to clean out the old JDK versions I had accumulated over a few years. I also wanted to have a Java 9 JDK to play around with the new module system and API’s.

Good news is that, for a while now, you have been able to install and upgrade multiple versions of JDK using only your shell, without having to deal with Oracle’s graphical installers.

To install Java from scratch, install Homebrew Cask cask-update (you need to have Homebrew already installed) first, then install Java using Cask:

brew tap buo/cask-upgrade & brew tap caskroom/versions
brew cask install java8

Keybase proof

I hereby claim:

  • I am tinkerware on github.
  • I am tinkerware ( on keybase.
  • I have a public key whose fingerprint is 475F DCA1 A51B C188 3078 C5F0 DA9B F876 9040 E7ED

To claim this, I am signing this object:

tinkerware /
Last active July 19, 2020 15:38
Build hsdis for JDK 1.8u92 on El Capitan
# You will need Mercurial; get it with `brew install hg`.
hg clone
cd jdk8u
hg update jdk8u92-b14
chmod +x ./; ./
cd hotspot/src/share/tools/hsdis
tar -xzf binutils-2.26.tar.gz
make BINUTILS=binutils-2.26 ARCH=amd64
tinkerware / cold-t12.log
Created January 6, 2015 18:33
Okio BufferPerformanceBench runs - EC2 c3.8xlarge
View cold-t12.log
# JMH 1.4.1 (released 12 days ago)
# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java
# VM options: <none>
# Warmup: 10 iterations, 10 s each
# Measurement: 5 iterations, 60 s each
# Timeout: 10 min per iteration
# Threads: 12 threads, will synchronize iterations
# Benchmark mode: Throughput, ops/time
# Benchmark: com.squareup.okio.benchmarks.BufferPerformanceBench.cold
# Parameters: (maxReadBytes = 1024, maxThinkMicros = 1000, maxWriteBytes = 1024, requestSize = 2048, responseFactor = 16)
tinkerware / Vagrant provision block
Last active January 21, 2019 01:11
Install Latest Java 7 and Java 8 on Ubuntu 14.04 LTS
View Vagrant provision block
config.vm.provision "shell", inline: <<-SHELL
apt-get -y -q update
apt-get -y -q upgrade
apt-get -y -q install software-properties-common htop
add-apt-repository ppa:webupd8team/java
apt-get -y -q update
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
apt-get -y -q install oracle-java8-installer
apt-get -y -q install oracle-java7-installer