• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

CLASSPATH in Windows 2003 server

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and CATALINE should be CATALINA
 
Mathias Nilsson
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic