Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

problem compiling Servlets

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Freinds!!
my java complier is in
c:\jdk1.3\bin
the servlet class is in
c:\tomcat\jakarta\bin\webapps\myApps\Web-Inf\class
the servlet.jar is in
c:\tomcat\jakarta\bin\lib\common
I have set the CLASSPATH file for servlet.jar
Now my problem is that since the javac (the complier is in different directory how do i compile the servlet
Any info?
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
If you add 'c:\jdk1.3\bin' to the PATH then you can call javac from any location in the file structure.
/Rene
 
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do what i always do to avoid this all path issue:
copy the servlet.jar to this directory:
c:\jdk1.4\jre\lib\ext
you get the idea (although your directory structure may be a little different).
 
Anil Jain
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Rene and Roy!!
Rene i could use the PATH variable successfully thanks for your help.
Roy if i m not wrong that you want me to put the servlet.jar file in jdk directory so that whenever i import any javax classes the compiler can easily access thru servlet.jar in the same directory.
Correct me if i m wrong in getting this point.
Thanks Again,
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you got it
all external classes you get, including the servlet.jar classes, you can put in the ext directory i showed you.
then the java compiler finds them automatically without needing the classpath commands.
 
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic