I'm a J2EE newbie and I have a servlet that Eclipse can't compile
because it can't find any J2EE objects or packages (e.g.,
javax.servlet).
So my question is, how do I get Eclipse to find the J2EE jars? Does it
have a special environment variable for that? Is there something I
should be adding to my PATH? I even tried adding the .jars as user
jars and it didn't let me do that.
My SDK is J2EE sdk 1.4, the one that comes with the Sun app server.
It's installed in the default location, i.e., C:/Sun/AppServer/jdk.
I have set Windows environment variable J2EE_HOME to C:\Sun\AppServer
and JAVA_HOME to C:\Sun\AppServer\jdk, and I added
C:\Sun\AppServer\jdk\bin to my PATH.
Eclipse has set its JRE_LIB variable to
C:\Sun\AppServer\jdk\jre\lib\rt.jar. It finds the JRE directory and
shows no compilation problems for objects in J2SE.
What am I missing? I am sure there are other people with this problem.
If anyone knows a solution, I gratefully thank you in advance.
Shelah
Roedy Green - 26 Feb 2006 00:03 GMT
>So my question is, how do I get Eclipse to find the J2EE jars? Does it
>have a special environment variable for that?
select the project. Right click Build path. Click configure Build
path. I think it should be obvious from there.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.