The moose likes Tomcat and the fly likes CLASSPATH in Windows 2003 server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "CLASSPATH in Windows 2003 server" Watch "CLASSPATH in Windows 2003 server" New topic
Author

CLASSPATH in Windows 2003 server

Mathias Nilsson
Ranch Hand

Joined: Oct 13, 2003
Posts: 107
Hi Ranchers!
I have this stored in my Environment variables.
CATALINE_HOME
d:\tomcat4.0
JAVA_HOME
d:\jdk1.3
PATH
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\jdk1.3\bin;D:\jdk1.3\jswdk-1.0\lib\servlet.jar;D:\Program Files\Microsoft SQL Server\80\Tools\BINN;d:\tomcat4.0\common\lib\servlet.jar
Everytime when I'm about to compile a servlet I get a error. I must first write SET CLASSPATH=d:\tomcat4.0\common\lib\servlet.jar
I don't understand why since I have it in my environment variables. Does anybody know what's wrong.
By the way. I can compile java code not implementing the javax package.
// MAthias


SCJP2 , MCP( 70-229 ) , Preparing For SCWDC
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

because compiling servlets (and any other java classes) requires that your jar files be on your *classpath* (not path).

javac -classpath .;c:\tomcat\common\lib\servlet.jar MyServlet.java

The reason you can compile anything that doesn't use the javax. package, is because all the jdk classes are automatically available to you, without having to set anything specially in classpath.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

and CATALINE should be CATALINA
Mathias Nilsson
Ranch Hand

Joined: Oct 13, 2003
Posts: 107
Thanks!
Added CLASSPATH as environment variable and it works fine.
and CATALINE should be CATALINA

I spelled it correct in Environment but not here.
// Mathias
 
 
subject: CLASSPATH in Windows 2003 server
 
Threads others viewed
Applet notinited
classpath problems!
javacommon.zip and partitioned hard drive.
Tomcat installation problems!
NoClassDefFoundError.....Help
developer file tools