Lately I had pulled a new project to work on, a XPages application with a few external jar files.
When I tried to build the application it produced a lot of errors. The most annoying error was that classes could not found, and these classes are inside the external jar.
When I looked inside the application view in the Domino Designer I found the external Jars in the Jars section under code as Jar design element.
In the build path there was a reference to these external jars, but the path was changed to WebContent/WEB-INF/lib/external.jar.
In the package explorer the lib directory under WebContent/WEB-INF was present but empty.
So the Domino Designer magically moves the external jar files under the hood to the correct location. Nice but it gave me a very strange feeling and lots of errors, because it could go wrong.
Get it working
I have removed all the references of the external jar file from the build path. Moved all the external jars in the Package Explorer from the jars section to the correct location, WebContent/WEB-INF/lib/. That location is the correct place where a Java server is looking for external jars, anyway so why not put them there immediately.
Build the application and gone where all the errors.
As I move more and more over to the J2EE world I get used to the real Eclipse and his perspectives and views. I ‘live’ in the package explorer and have not the luxury of an Application view with design elements. In Domino Designer I hardly use the Application view, everything I do on XPages development I do in the Package Explorer. More what you is what you get 😉
If you want to look around to other technologies and Java/J2Eee/Vaadin is your choice, get use to the Package Explorer and abandon the use of the Application View.
The same apply of the Java classes as for the jar files, put them directly on the right location in a directory under WebContent/WEB-INF/ and make this directory a source folder.by