How to set JAVA_HOME during deployment

I am using a batch file to install a java program using the java jar command.  This program requires JAVA_HOME to be set to the correct version of java for this install to work.  The batch is executing, but the part of the install that requires JAVA_HOME is failing.  How can we set this during the deployment so it will work properly.  The process works fine when I run it manually, just not through Deploy.

0

Comments

2 comments
Date Votes
  • My guess is that because JAVA_Home is an environmental variable, the account your using to deploy the script may not be able to see this Environmental Variable (no user profile / env. var created for the deployment user).

    I'd suggest reading an article like these: 

    I suppose it might be program installation dependent of how the installation is called but would think that you might just have to get/set the environmental variable within your batch file during the install command.

    0
  • I actually do have setting JAVA_HOME inside the batch already.  That's why it works when I run it manually.  I also just proved that JAVA_HOME isn't the problem as I originally thought.  It is being set.  What's weird is the installation is failing in the same way it would if it doesn't have JAVA_HOME.  So I'm not sure what's happening.  It works fine just running it, but fails through Deploy.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post