Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse helios: tomcat project - jar will not be exported or published. runtime ClassNotFoundExceptions may result

I'm using Eclipse Helios and I was wondering how can I add a library project to my folder that will be copied to the build directory where my compiled project resides.

currently I did the following:

  1. created a lib directory in the root of my project
  2. copied the relevant jars to that dir
  3. My Project -> properties -> Java Build Path -> add jars and I added all the jars from that directory.

after adding all the jars i got the following warning regarding each of the jar file:

jar will not be exported or published. runtime ClassNotFoundExceptions may result

first of all how can I add the directory of the jars instead of individual jars? and the 2nd question is how can I do that the libraries will be deployed properly when compiling my application ?!

like image 329
ufk Avatar asked Nov 23 '10 07:11

ufk


1 Answers

In eclipse Junu:

in a web project, after adding jar to build path, one must add it to

Deployment Assembly

(in project properties)

when adding that jar to "Deployment Assembly" press the add button and select

Java Build Path Entry

(and not other workspace or file system option)

like image 68
ozma Avatar answered Sep 21 '22 23:09

ozma