This is the only way I was able to do what you offer (I don't know if there are better ways).
A jar file package that contains the source code for the jar file. Put it inside your project in a folder (you don't need to add it to your class path)
In the eclipse project, right-click on the JAR file and go to “properties” and then to “Java Source Application”. From there, select "Workspace" and select the jar file with the source code that we added from the above step.
Thus, the source binding path will always be related to the project. Thus, if you transfer the project via SVN, GIT or something else, the source will always be available, and it will work if the user runs eclipse on Windows or Linux.
I had a similar problem with you, when absolute paths were a problem for people using different OSs, and even without using mapped drives through Samba, it helped a lot.
Hope this helps.
source share