Skip to content

Instantly share code, notes, and snippets.

@camsaul
Created March 29, 2017 18:19
Show Gist options
  • Save camsaul/c982019fd915510677236cd4b720a583 to your computer and use it in GitHub Desktop.
Save camsaul/c982019fd915510677236cd4b720a583 to your computer and use it in GitHub Desktop.
Run lein with different JVM
#!/bin/bash
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home lein run
@mourginakis
Copy link

mourginakis commented Sep 15, 2022

Is it possible to set JVM version per project, for example via project.clj?

you can, add
:java-cmd "/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java"
to your project.clj, or the path of whatever other java binary you are using

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment