Setting liquibase classpath using the Liquibase Java API

I’m trying to upgrade liquibase from 3.8.0 to 4.9.1 but I get the following error:

Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter.

I want to include ‘/’ in the classpath

I have read this page: How Liquibase Finds Files: Liquibase Classpath | Liquibase Docs
But I don’t have a file and I’m not using liquibase pro.

We are using liquibase-core, importing it using gradle and creating and setting the liquibase object in java:

Liquibase liquibase = new liquibase.Liquibase(changelog, new FileSystemResourceAccessor(), database);

Is there a way to set the classpath setting in gradle or in java so that ‘/’ is included in the classpath and the changelog is found?

What I did to solve this was the following:

Liquibase liquibase = new liquibase.Liquibase(
      new FileSystemResourceAccessor(path),

Setting the path/file in FileSystemResourceAccessor lets you configure where liquibase looks for the changelog and other files