This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help please!!! Environment var.......

 
Stephen Batsas
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranchers,
Please help me with this one. Its breaking me.
OS = WIN98
Using J2SDK1.4.0 to compile Servlets
My java source files are kept in c:\ServletDevel
Tomcat4.0 is in c:\Tomcat4
servlet.jar is in c:\Tomcat4\common\lib\
Autoexec.bat contents reads as follows:
SET JAVA_HOME=C:\j2sdk1.4.0;
SET CATALINA_HOME=C:\tomcat4;
SET CLASSPATH =
.;c:\ServletDevel;c:\Tomcat4\common\lib;c:\Tomcat4\common\lib\servlet.jar
//all on one line
When I compile - cannot find javax.servlet or javax.servlet.http
I followed the instructions from More Servlets and JSP By Marty Hall.
What is wrong? Please advise. I need to move on.
Regards
Stephen Batsas
SCJP2
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this:
SET CLASSPATH =
%CLASSPATH%;.;"C:\ServletDevel";"C:\Tomcat4\common\lib";"C:\Tomcat4\common\lib\servlet.jar";
I don't use W98 so this is a naive guess.
you might need to restart
[ February 26, 2002: Message edited by: ersin eser ]
 
Stephen Batsas
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ersin,
Ill give it a go
Regards
Stephen Batsas
SCPJ2
 
Stephen Batsas
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ersin,
No good. Didnt work. Any other suggestions?
regards
Stephen Batsas
SCPJ2
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Type "set" in Dos - Box. What do you see regarding your Classpath-variable?
Axel
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this:
SET CLASSPATH =
%CLASSPATH%;.;"C:\ServletDevel";"C:\Tomcat4\common\lib";"C:\Tomcat4\common\lib\servlet.jar";


Remove the semi-colon at the end of the above statement.
- satya
 
Stephen Batsas
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fellas,
Its not working so I have created a batch file to point to the servlet.jar when compiling. Also I discovered that if there is more than one dependent java file (eg ServletUtilities.java & HelloServlet.java). To compile both succesfully in a package ( eg c:\ServletDevel\moreservlets ) I use @project.list at the command line arg. So Finally I can compile the java source files and deploy them to the required directory. The only constraint is having to copy the jcompile batch file to each new package directory. Note that there is package directory for source as well as the generated class files.
I open to any other suggestions. Remember none of the above classpath statements inserted into my autoexec.bat file had any effect.
Regards
Stephen Batsas
SCPJ2
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I open to any other suggestions. Remember none of the above classpath statements inserted into my autoexec.bat file had any effect
Do this - open a new DOS window.
type "echo %CLASSPATH%" without the quotes
and let us know what it says.
we will go from there.........
- satya
 
Stephen Batsas
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranchers,
This is my autoexec.bat
SET JAVA_HOME=C:\j2sdk1.4.0
SET CATALINA_HOME=C:\Tomcat4
SET CLASSPATH =%CLASSPATH%;.;"C:\ServletDevel";"C:\Tomcat4\common\lib";"C:\Tomcat4\common\lib\servlet.jar"
//note above is on one line of course
When I compile - cannot find javax.servlet.*;
I have to point to it in a batch file
What is wrong with the autoexec statement.
Regards
Stephen Batsas
SCPJ2
PS I got my SCPJ pin today. Do you actually wear this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic