• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Does not able to compile Servlet

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I got the problem while I am compiling my servlet class code is so simple and I set up my classpath too but I got the error message like

I set up my classpath like
C:\j2sdkee1.3.1\lib\j2ee.jar;C:\j2sdkee1.3.1\lib\classes;C:\jdk1.3.1_02\bin; C:\j2sdkee1.3.1\bin;c:\j2sdkee1.3.1\lib\locale

and my J2ee server is running fine got no problem with that .why is that help me please
Cheers,
Jaffrey
 
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I set up my classpath like
C:\j2sdkee1.3.1\lib\j2ee.jar;C:\j2sdkee1.3.1\lib\classes;C:\jdk1.3.1_02\bin; C:\j2sdkee1.3.1\bin;c:\j2sdkee1.3.1\lib\locale


First of all, the bin directories should be in the path, not classpath. Only classes go in the classpath. Also, you do not need the lib\classes in the classpath. You just need the jar files. Anyway, this probably doesn't matter in this case since your system is able to find javac. I would still clean this up anyway though. Try this after cleaning up the mess: Type set classpath from the command line and see if the j2ee.jar is there and verify that the path is correct. If it's there and it points to the correct file, then it will work. Hope this helps!
Barry
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you should verifythat the jar files you are ussing in your classpath
in this case "C:\j2sdkee1.3.1\lib\j2ee.jar" contain the Package you are trying to import..
use winzip to see the contents of the Jar file ..
as it were a simple zip file ..

if you don't find the javax.servlet. package
just include the Jar that has it..
 
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mario Rendon:
use winzip to see the contents of the Jar file ..
as it were a simple zip file ..


Alternatively, you can use jar -tvf jarFileName.jar | more
 
I think I'll just lie down here for a second. And ponder this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic