• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Newbie Eclipse Question: Whats the difference between Manifest and Build Path?

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple newbie question about the difference between Manifest and Java Build Path in Eclipse.

I have 3 J2EE Packages:

1 EJB Package
1 Web-Service Package
1 EAR Package which contains the above two packages


In the EAR, I see both the EJB Package and the Web-Service Package set under the Modules folder as a Services.war and a EJB.jar.

The Web-Service Package needs to access the EJB in my development environment so I goto the Properties window of the Web-Service Project and click on the Deployment Assembly option and add EJB.jar in the Manifest Entries tab. This would allow Eclipse to detect my EJB classes when I do import statements in the Web-Service classes.

However, I also found that I could do the same thing if I only add the EJB Project to the Projects tab of Java Build Path in the Properties for the Web-Service Project.

What exactly is the difference between these two ways and does it affect the behavior of the final EAR Package?
 
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My educated guess is that the difference is when you want to run your code outside of Eclipse. If you haven't set up your manifest file correctly, the application will not run as desired.
 
author & internet detective
Posts: 42134
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tom is 100% correct. The build path is used at compile time. The manifest is used when you deploy.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic