0

First of all, new to Java / Eclipse IDE, so please bear with me.

So, I have created my own project, and I have an external library (class files contained in jar files) in a "lib" folder of my project/workspace. I have created build path, and have the external library source code implemented as well. So, under Referenced library, I have editable .java files for the external library.

Implementation of the external library seems to have worked, as I do not get any "noclassfound" exceptions etc. However, it does not seem as changes I make to the referenced library source code has any effect.

My project is an OpenHab project, where I have a pom file which I run "mvn install. The resulting jar file is used for OpenHab installation. My classpath file has reference to lib files and source code.

Any idea why my source code changes will not take effect?

  • when you say referenced library code is editable, after editing how you are building the external libraries ? – Rmahajan Apr 12 '19 at 11:02
  • In Eclipse I have enabled automatic build, so I have been assuming that my changes to .java source code would change the library automatically. – Stian Kjøglum Apr 12 '19 at 11:22
  • Note that my changes are method related, not doing any changes to dependencies. So basically, I change source code (.java) under Referenced library in Eclipse and run "mvn install" for my project from within Eclipse, to end up with a jar file (retrieved from target folder). – Stian Kjøglum Apr 12 '19 at 11:32
  • If I understand right, you have made changes to reference libraries in eclipse, so you have to first build jar for referenced libraries, not for your code. – Rmahajan Apr 12 '19 at 12:06
  • So I have to rebuild reference library each time I make changes? Because I have my own source code (application specific under src/java) which use the external library. However, I need to customize the library to fit my code. So I will make quite some changes/testing. – Stian Kjøglum Apr 12 '19 at 12:34
  • If you are changing reference library code then yes I believe you have too. – Rmahajan Apr 12 '19 at 12:38
  • According to https://stackoverflow.com/questions/20299141/eclipse-rebuild-a-project-and-all-librariest it is really not recommended to perform a separate rebuild. – Stian Kjøglum Apr 12 '19 at 19:45

0 Answers0