Problems setting up Liquibase CLI in Windows, need some help

When I setup Liquibase CLI in Windows other than version 3.6.3 , I get a “The system cannot find the path specified.” message. Version 3.5.5 also seems to work without issue but nothing higher than 3.6.3 so I am just going to reference 3.6.3 in this post.

I get this same issue on my work laptop and on my personal laptop for any liquibase version not 3.6.3.

I have download the ZIP asset from a GitHub release for say 4.3.3, I unzip the file, set a LIQUIBASE_HOME environment variable to the un-zipped version 4.3.3, I have a %LIQUIBASE_HOME% path in my System PATH variable, I restart (its probably not needed but I do it to be safe), open up CMD prompt, type in ‘liquibase --version’ and I get the “The system cannot find the path specified.” message on my work PC. I have JAVA_HOME setup to JAVA 11 JDK setup already.

I have used Liquibase 3.5.5 and 3.6.3 previously so I have not used the Windows Installer EXE but on my new personal PC that’s never had liquibase setup before. I setup JAVA_HOME to JAVA 11 JDK and then used the Liquibase 4.3.3 Windows Installer EXE to setup liquibase. The install completed, it setup a ‘C:\Program Files\Liquibase’ location to my User PATH variable, I did a restart of the PC, then opened up a CMD prompt, type in ‘liquibase --version’ and I get the “The system cannot find the path specified.” message.

So is liquibase not working from the Command Prompt in Windows starting at a specific version? This is really frustrating that Liquibase commands no longer work from the command prompt when setup to a newer version of Liquibase.

I usually check the validity of change log files that our services/developers are using outside of the development project since it was pretty quick to test deployment and changes to any change log files using liquibase commands from the command line.


On a side note, I have WSL1 setup (to due WSL2’s weird VPN issues) on my work PC and when I have ‘LIQUIBASE_HOME’ system variable set in Windows System Environment settings to Liquibase 4.3.3, like I said earlier ‘liquibase --version’ command does not work but from WSL Terminal I can run ‘liquibase --version’ and get back the version information. I don’t know why it seems to work in WSL Terminal but not in Command Prompt when the Window System Environment variable is set.

Then when I use a Liquibase command from the WSL Terminal pointing to a change log file within a WSL directory location to deploy changes to a database, Liquibase throws an error stating that the changelog file that I specified does not exist. Yet it does exist and the change log file has all read permissions enabled. So I can’t get any further using WSL either. But I would really like to just get the Liquibase CLI commands working at the normal Command Line or PowerShell prompts.

Thanks for any help in advance.

Hi @jwsql2019 ,

I have a few questions for you:

  1. Are you the Administrator on this machine?
  2. Can you try installing Liquibase in a different location, for example in your user directory?
  3. Can you run java -version from your command prompt and confirm the java version?