JIRA config tool says wrong JVM, but it's not!

I need to run the JIRA config tool to change my JIRA's database connection.  So I went to the bin folder (installed on a Windows Server) and ran the config batch file.  This is what I get:

C:\Program Files\Atlassian\JIRA\bin>config
*******************************************************************************
******* Wrong JVM version! JIRA requires at least 1.8 to run. *******
*******************************************************************************

So I check the JAVA_HOME variable and it's set properly (actually, there is no older version of Java installed on this machine as far as I know):

C:\Program Files\Atlassian\JIRA\bin>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_73
C:\Program Files\Atlassian\JIRA\bin>echo %JRE_HOME%
C:\Program Files\Java\jre1.8.0_73

I set it up this way because I am trying to run Bamboo as well on this server and had read this is the correct configuration of Java variables, although I haven't been successful yet.  At any rate, I change the environment variable for JAVA_HOME to point to the JRE, but I still get the same error from the config tool.  Also, after stopping all of the services, I can longer start Bitbucket or Bamboo now.  It tried to start the services briefly, then immediately stops and gives me an error with no info about why.  

So I'm very stuck now, and in the middle of trying to evaluate these products for purchase.  Any help in getting these up and running is very much appreciated!

Thanks,

Eddie

4 answers

1 accepted

I just encountered the same problem with config.bat

The JAVA_HOME environment variable was not pointing to where the java executable is.

Run 'where java' at your command prompt, for me there was some oracle install at

"C:\ProgramData\Oracle\Java\javapath\java"

In config.bat I edited the _EXECJAVA to point to my executable and it then worked. I've no idea where that oracle install came from, or even where that folder is. It must be a hidden folder as you don't see it in windows explorer.

Check the setenv.bat script to see where/which Java your JIRA is using. 

And/or the config.bat (both can be found in the bin directory). You may need to explicitly specify which Java your JIRA needs to use here.

It was set to the jre that ships with JIRA in the setenv batch file.  Kind of shocking that the jre that ships with JIRA can't be used to run the config tool, but that's another issue...  So I changed it to point to the new jre I just setup.  I'm not entirely sure about the config batch file.  It looks like it's pointing to the JRE_HOME path:

:gotJreHome
REM Use the java from (1) JRE_HOME or (2) JAVA_HOME; supports spaces in these paths
set _EXECJAVA=%JRE_HOME%\bin\java

I tried changing it to this:

set _EXECJAVA=%JRE_HOME%

But both still give me the same Wrong JVM version! error when I run config.  How do I force setenv to run again and pick up the new JVM path?

Thanks for your help!

You should have something like this.

JRE_HOME=C:\Program Files\Java\jdk1.8.0_73

Hi

Like Jamie  said making below changes in the config.bat will solve the problem.

 Step -1:  verify if JDK is installed

               in my case it in installed at -> C:\Program Files\Java\jdk1.8.0_181    (64-bit)

 

Step-2: Edit the config.bat located at -> C:\Program Files\Atlassian\Jira\bin

    once you edit you will find some text..  browse until you see :

      :gotJreHome
REM Use the java from (1) JRE_HOME or (2) JAVA_HOME; supports spaces in these paths
set _EXECJAVA="%JRE_HOME%\bin\java"

 

Replace set _EXECJAVA="C:\Program Files\Java\jdk1.8.0_181\bin\java.exe"     

                                         // If your java is pointing a different version give that path here.

 

Note - save a copy of Config file before you make any changes.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

36 views 0 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you