I have a web project in my workspace that has a dependency on a java project in the workspace. In project references, I made my web project reference the java project, but there are still build errors that indicate that classes in my java project are not referenced by my web project.
Asked
Active
Viewed 5,205 times
1 Answers
2
An Answer
This is not a direct answer to your question, but is an solution to the problem you are experiencing. The java project must be deployed for your web project to run in any environment other than you eclipse debug environment. I assume that the deployment technique is a JAR file.
- Build the java project. That is, produce the deployable jar file. I will call this the XYZ.JAR file.
- Put the XYZ.JAR file in the /WEB-INF/lib of your web project.
Possible answer to your question
Check the following, I suspect your answer lies therein:
- Is the JDK Compliance of the java project different from the JDK compliance of the web project? Higher on the web project is fine. Lower on the web project will not work.
- Did you build the java project?
- Is automatic build set for the java project. I suggest that you sould set auto build.
- Try running a clean then a build on the java project then the same on the web project.
- You say dependancy. Do you mean that you added a reference to the java project in the Properties!Java Build Path!Projects tab of the web project? If the answer is no, then you should add one. Note: this is fine for compilation, but in no way helps once you deploy.
- Have you setup an EAR file with which to deploy the java project and the web project (not applicable if you are deploying to a servlet container such as Tomcat)? If yes, then add a reference to the java project in the Properties!J2EE Module Dependencies of the web project

DwB
- 37,124
- 11
- 56
- 82