Skip to content

Instantly share code, notes, and snippets.

@libbkmz
Created August 3, 2015 21:31
Show Gist options
  • Save libbkmz/23fc83d87bb3e8809e0a to your computer and use it in GitHub Desktop.
Save libbkmz/23fc83d87bb3e8809e0a to your computer and use it in GitHub Desktop.
#!/usr/bin/python2
import sys
import os
WRAPPER = "/usr/bin/java"
args = sys.argv[1:]
args.insert(0, WRAPPER)
for i, arg in enumerate(args):
if arg.startswith("-Xmx"):
args[i] = "-Xmx2G"
os.execv(WRAPPER, args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment