Will McQueen

Greenhorn
+ Follow
since Mar 13, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Will McQueen

Hi,

What is Eclipse's Project References Property Page used for? This prop page is shown when viewing the project properties.

I've searched via Google, the Eclipse help docs, and this forum trying to find out how this prop page is useful, but I still don't understand why it exists. Here's what I know so far:

1) If I go to the Project Reference prop page and checkmark a Java project that's listed on this prop page, then an entry is placed into the .project file. Why is this useful? I don't know.

2) Even if I go to the Project Reference prop page and checkmark a Java project that's listed on this prop page, then I still get compiler errors when I try to import a class from a dependent project.
Eg, if projB attempts to import a class from projA, then I get compiler errors even if I go to projB's Project Reference prop page and checkmark "projA". To resolve the compiler errors, I actually need to add projA to projB's build path. Which again leaves me wondering... what is the Project References prop page useful for? And when I do add projA to projB's build path, then (strangely enough) projB's Project Ref prop page shows that projB remains unchecked. Shouldn't an explicit build path dependency on a project count as a project reference, and so automatically checkmark the dependency, projA?

3) If I go to the Project Properties page of a generic, non-Java project, then naturally I don't see the Java Build Path prop page... But the Project References prop page is still there... Could this mean that this prop page is intended only for generic, non-Java projects? If so, then again.. for what reason?

4) I've seen the Project References prop page in the context of web apps in some places, but the reasons for mentioning/using it weren't clear.

Very confused. Seeking clarification, please. I would greatly appreciate any help.

Thank you.

Cheers,
Will
Hi,

I'm reading about the packaging rules for creating an ejb-jar.jar file, and I'm wondering whether it's possible to include a jar file (containing helper classes) inside of the ejb-jar file. A "lib" dir (for containing such helper jars) doesn't seem to be part of the ejb-jar file format.

The EJB 3 spec has this to say (Ch 20, "Enterprise JavaBeans 3.0, Final Release):
"The ejb-jar file must also contain, either by inclusion or by reference, the class files for all the classes and interfaces that each enterprise bean class and the home interfaces, component interfaces, and/or web service endpoints depend on, except Java EE and J2SE classes. This includes their superclasses and superinterfaces, dependent classes, and the classes and interfaces used as method parameters, results, and exceptions"

Now, it seems that the root of the the ejb-jar file contains all the classes (in the appropriate Java package layout). But what about including JAR files? The ejb-jar spec seems to have nothing to say about a "lib" dir that can contain jars (as a WAR file can).

Summary of questions:
1) Can an ejb-jar file contain a jar file? If so, how/where?
2) Can the ejb-jar file's META-INF/MANIFEST.MF file contain a reference to a JAR file?

I'm not considering correct design at the point... I'd just like to know if these 2 scenarios are possible.

Thank you!
Will