Skip to content

Instantly share code, notes, and snippets.

@Fi5t
Last active May 28, 2016 23:21
Show Gist options
  • Save Fi5t/bf1e5fa7c22bab5d52ab4f5436f04a92 to your computer and use it in GitHub Desktop.
Save Fi5t/bf1e5fa7c22bab5d52ab4f5436f04a92 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# It brings JDK8 to Android Studio
__author__ = 'Fi5t'
from plistlib import readPlist, writePlist
def set_jdk(plist, version):
with open(plist, 'rb') as f:
pl = readPlist(f)
pl["JVMOptions"]["JVMVersion"] = version
with open(plist, 'wb') as f:
writePlist(pl, f)
default_info_list_path = "/Applications/Android Studio.app/Contents/Info.plist"
default_jdk_version = "1.8+"
set_jdk(default_info_list_path, default_jdk_version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment