• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Why do we need to set the buildpath of the jar files

 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
: I am developing 'StrutsEx'named struts application in RAD7.0. I have all the required jar files like



struts2-core-2.0.11.2.jar

ognl-2.6.11.jar

commons-logging-1.0.4.jar

freemarker-2.3.8.jar

xwork-2.0.5.jar

within StrutsEx\WEB-INF\lib.

I saw lot compilation errors earlier. But later when I add above mentioned jar files by right clicking on project--->properties--->java build path--->add external jars--- then the compilation issues were resolved. My question why we need to add those files separately like

project--->properties--->java build path--->add external jars

eventhough those jar files are already present within the lib folder of the project.
 
Ranch Hand
Posts: 1902
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might be better off asking this question in the IDE forum.

The very basic answer, though, is that the JARS need to be in the classpath of the compiler when you're building your application, and RAD pulls it from where you specify in that dialogue box. (I don't claim to be an expert on RAD, though.)
 
Sheriff
Posts: 22716
129
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Theodore Casser wrote:You might be better off asking this question in the IDE forum.


And moved.
 
Ranch Hand
Posts: 282
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you create a classpath, you have to include the path to every single JAR file you're using...even if they are all in the same directory (i.e. it won't let you do something like "foo/bar/*.jar"). That's probably why you had to add each JAR separately...but yeah, sounds more like an IDE issue, since it should take care of that for you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic