Here�s all the pertinent info:
I keep getting a compilation error when trying to import J2EE classes. For example:
will cause the compiler to give me a �package javax.servlet.http does not exist� error.
I am using Windows XP, a text editor, and the command line to compile my code. I did have IBM�s WebSphere Application Developer (WSAD)IDE running on this computer at one point, but that is uninstalled now. I also have a DB2 client app running on the computer (it�s noted in the CLASSPATH string below).
CLASSPATH string (I separated each part of the string into a new line for readability):
This shouldn�t be too hard, but apparently it is. Does anyone have any idea why?
I then updated my PATH and CLASSPATH variables to include the following:
Then I unsuccessfully tried to use the following command to compile my code:
There are two questions that I have about this:
Is there any difference with regards to Microsoft Windows versus Linux/UNIX on any of this?
[ March 07, 2005: Message edited by: Chris Staten ]
Do I always have to give the full path to a jar file that I want to use as opposed to just giving the path to that directory?
Not sure about this, but I think so... If you have a classes directory (not jarred up) then the directory is sufficient.
Why will my code compile when I use the �classpath argument, but not when I rely on the CLASSPATH variable (therefore leaving off the �classpath argument when compiling)?
Did you open a new dos prompt after changing the CLASSPATH to include the .jar file? A command window won't pick up changes in the environment variables so you need to open a new one.
[ March 07, 2005: Message edited by: Tom Katz ]
This also seems to validate your statement that �If you have a classes directory (not jarred up) then the directory is sufficient.�
Now I just need to figure out how to include my Oracle JDBC driver classes
You�ve been a big help Tom, thanks.
But the answer to including my Oracle JDBC drivers was to put them in my web application�s lib directory.
[ March 08, 2005: Message edited by: Chris Staten ]