problem with compiling when i import javax.servlet.*;


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: problem with compiling when i import javax.servlet.*;

  1. #1
    Join Date
    Jul 2004
    Posts
    6

    problem with compiling when i import javax.servlet.*;

    Hi all

    I was reading some servlet tutorial and decided to try out the codes..

    however when i try to compile, i get error msgs like
    package javax.servlet cannot be found

    what is wrong??

    i am using j2ee 1.4

    how come i cant compile the servlet?

  2. #2
    Join Date
    May 2004
    Posts
    219
    I can't read :O

  3. #3
    Join Date
    Jul 2004
    Posts
    6
    i just installed...
    but i still cant javac..
    what am i supposed to do to be able to do tat?

  4. #4
    Join Date
    Aug 2004
    Posts
    3
    This problem is related with CLASSPATH. After installing the jdk under your local directory, set the classpath information. I can provide you with the detail by which you can create a CLASSPATH variable and add the classpath information

    Goto Mycomputer -> Right Click -> Select Properties -> CLick on the Advanced tab -> Click on the Environment Variables button -> Check for ClassPath variable, if you find one, click on the Edit button provided and provide the ClassPath information in the popup box. If There is no variable named Classpath then click on the New button provided below and provide the classpath .

    If jdk is in C:

    Then the path should be set as given below:
    c:\jdk1.4.2\bin.

    The version in the file name depends on the version of the jdk installed in your PC.

    Try this..
    JVRK

  5. #5
    Join Date
    Aug 2004
    Posts
    3
    In my previous reply I mentioned Jdk in the classpath.
    if you have the j2ee1.4 under C: ,Change it to j2ee1.4 and try

    c:\j2ee1.4\lib and try..
    JVRK

  6. #6
    Join Date
    Jul 2004
    Posts
    6
    still cant...

    im using d:/sun/appserver/lib
    and d:sun/appserver/jdk/bin

    i put this into CLASSPATH but i still cant javac anything that requires import of javax.*.*

  7. #7
    Join Date
    Feb 2004
    Posts
    808
    did i not already answer this?

    Im sure i told you to post the results from typing SET at the command line?
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

  8. #8
    Join Date
    Aug 2004
    Posts
    3
    Hi,
    I hope by this time you could have solved this problem, If not try with this. Even though u have J2ee package. You might require Servlets package to compile your program.Attached is the the jar file which consists of all the class files we need for compiling the servlets. You may need to place the jar file under c:\ or any directory and specify the location in the ClassPath. It should definitely work. Extract the Zip file and add the JAR file name in the classpath.

    Thanks,
    Janci
    Attached Files Attached Files
    JVRK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center