0

I created a user library from Eclipse / Java Build Path / Add Library / User Library. The project is based on Maven, but due to some issues with jar files from the local repo, I need to pull the correct jars from another place.

I added the user library by creating a new folder userlib and copied the jar files to this folder, and configured this user library from Java Build Path and everything worked like a charm.

I pushed the changes to SVN, including the jar files. Another developer pulled the changes, and he can see the new folder userlib but it is not showing as part of the build path. He can see the userlib entry under Java Build Path / Libraries, but it is not considered an active library, and the project shows compilation errors in Eclipse.

How I can fix this issue?

Or better, what is the best way to achieve the desired result and share it among other developers without the need to manually change the project configuration? I want to add a jar file to the build path and the jar file is part of the folder structure of the project, and want all the developers to take advantage of this setup. How is this possible?

tarekahf
  • 738
  • 1
  • 16
  • 42
  • Did you push the `.classpath` file changes? – nitind Jul 18 '23 at 13:11
  • Yes, I pushed them, and they showed up on the other developer's laptop. – tarekahf Jul 18 '23 at 13:28
  • Did they define what the User Library by that name contains in their workspace's preferences? Making it a User Library is one of the ways to make the project portable when you *don't* want to have the jars inside of it. If you want the jars to live in the project in SVN, you'd add them as regular jars. https://help.eclipse.org/latest/topic/org.eclipse.jdt.doc.user/reference/preferences/java/buildpath/ref-preferences-user-libraries.htm?cp=1_4_4_0_1_1 – nitind Jul 18 '23 at 15:57
  • According to what we see, the userlib at their end is configured properly, but it is not effective. They deleted it and created it again, and it worked. I will check it out tomorrow. – tarekahf Jul 18 '23 at 19:38

0 Answers0