FOR %%I IN (*.jar) DO (
Execute it like this:
libs.bat > libs.txt. Then open
libs.txt and copy its content as dependencies.
In my case, I only needed the libraries to compile my code, and this solution was the best for that purpose.