Search code examples
eclipsebuildpathconnector-j

Error while keeping .jar file in buildpath of project on 2 laptops


I am using 2 laptops with the eclipse workspace synced through OneDrive.

I am working on a program which uses JDBC, with SQL. When I add the Connector/J.jar file to the build path from one PC, it shows an error in the other PC, and doesn't run at all. Is there any option to solve it such that no errors will be shown on any of the 2 PCs??

I want both my PCs to have their drives as clean as possible, so is there any way that I can have no errors without putting both the .jar files in a directory like C:\mysql-connector-java-8.0.23.jar??

P.S. I do not know much about build paths, so please explain in a simple language.


Solution

  • Yes, put the jars into the project itself so that the paths will be relative to the project.