Liquibase --help returns "The system cannot find the path specified"

I am using Liquibase from the command prompt on my Windows 10 PC and I have been using Liquibase since version 3.5.5 and 3.6.3 from the command prompt. I recently tried to upgrade to 3.8.9 using the associated ZIP files under the GitHub releases page. I updated my LIQUIBASE_HOME environment variable to point to the new un-ziped Liquibase 3.8.9 directory which is in the same directory as version 3.5.5 and 3.6.3 (each version has its own folder), I reboot my PC for the updated LIQUIBASE_HOME environment variable to update (it’s probably not necessary but I do the reboot anyway). JAVA_HOME is pointing to an AdoptOpenJDK Java 8 JDK version (Jave 8 update 242 b 8) and java is working from the command prompt. However when I go to run ‘liquibase --help’ at the command prompt I get a ‘The system cannot find the path specified.’ message.

Here’s the command prompt output of ‘liquibase --version’ command not working with Liquibase Version 3.8.9:
image

I have no clue why I can only get Liquibase version 3.5.5 and 3.6.3 to work form my command prompt. I have tried a bunch of other versions like 3.8.9, 4.3.3, 4.4.0, and 4.4.2 and all have the same problem.

I don’t know what the issue is and I have even tried to use the windows installer that has been packaged into the new versions of Liquibase and I get the same issue.

Does anyone know how to fix this issue?

When I search online, the ‘The system cannot find the path specified.’ error message leads me to issues with JAVA_HOME system variables and nothing is really Liquibase related. There was one stackoverflow article about this issue and Liquibase but a reboot fixed the posters issue for them and a reboot hasn’t helped me and as shown above some versions of liquibase work fine and others do not.

  • I can only post one image at a time for being a new user.

And here’s the command prompt output of ‘liquibase --version’ command working with Liquibase Version 3.6.3

Did you figure this out? Looks like there may be some other java environment variables that are messing with the output, for instance, I see _JAVA_OPTIONS is being picked up. You might clear some of those other options if you have not already resolved this issue.

I removed the ‘_JAVA_OPTIONS’ system variable and I am still getting the same issue where a ‘liquibase --version’ returns 'The system cannot find the path specified.

I just tried to get this working again. I am still having the issue after using the windows installer to install version 4.11.0 of Liquibase and have a recent version of Java 11 JDK setup as my JAVA_HOME system variable.

I am still stuck here.

C:\Temp>java --version
openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)

C:\Temp>echo %JAVA_HOME%
C:\RootDevEnvSetup\AdoptOpenJDK\11\jdk-11.0.15+10-jdk-x64\bin

C:\Temp>echo %LIQUIBASE_HOME%
C:\Program Files\Liquibase\liquibase

C:\Temp>liquibase --help
The system cannot find the path specified.

There may be a space in your path somewhere that the command line is not interpreting.

I just did a ‘echo %PATH%’ to check for spaces or any issues. Thanks.

While doing that I finally figured out what the issue was.

I need to have JAVA_HOME set to just ‘C:\RootDevEnvSetup\AdoptOpenJDK\11\jdk-11.0.15+10-jdk-x64’ directory without the ‘bin’ directory at the end.

Then I added ‘bin’ to the %JAVA_HOME% (so it’s now %JAVA_HOME%\bin ) under my ‘Path’ system variable.

Now everything is working fine and as expected. I can even switch between different versions of liquibase again like I was able to on my previous laptop when I was able to switch between the 3.X.X versions of liquibase before the 4.X.X series was release.

I think the issue was when I got a new PC a few months ago, I set up my JAVA_HOME system variable to include ‘bin’ directory and I have been having this issue ever since then.

Hopefully this helps others in the future. Such a small thing that was causing the issue.