I have a .jar file(insertdata.jar) which has a dependency with postgresql-42.2.23.jar.I have included main class in the Manifest file also. Currently both of these files are located inside C:\Users\yush\Desktop\java directory. I have tried to run insertdata1.jar file with following command in the command line.
java -jar C:\Users\yush\Desktop\java\insertdata1.jar
with this command I'm getting following error, which seems it is unable to access postgresql-42.2.23.jar classes.
java.lang.ClassNotFoundException: org.postgresql.Driver
My question is how do I run insertdata1.jar file in the command line with postgresql-42.2.23.jar?