Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to override java command with environment variable JAVACMD #12

Open
hbriceno opened this issue Mar 9, 2015 · 0 comments
Open

Comments

@hbriceno
Copy link

hbriceno commented Mar 9, 2015

Hello,
On MacOSX (and any other system) sometimes one has multiple java versions.
It would be good to be able to override the "java" command easily.
I propose a tiny modification to do this:

diff --git a/lib/libCompiler.js b/lib/libCompiler.js
index b39ea00..9909473 100644
--- a/lib/libCompiler.js
+++ b/lib/libCompiler.js
@@ -56,7 +56,8 @@ compiler.validateFile = function validateFile( fileObj ) {
*/
compiler.compileCommand = function compileCommand( options, fileObj ) {

  • var cmd = 'java ' +
  • var javaCmd = process.env.JAVACMD || 'java';
  • var cmd = javaCmd + ' ' +

This allows you to call
say you have a symlink java17 to a java 1.7 VM...
then you can call:

JAVACMD=java17 grunt...

request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant