URGENT-Executing JAVA programs

Discussion in 'QnA (read only)' started by nithinks, Dec 11, 2006.

Thread Status:
Not open for further replies.
  1. nithinks

    nithinks True Techie

    Joined:
    Apr 22, 2005
    Messages:
    260
    Likes Received:
    1
    Trophy Points:
    18
    hello members..

    I have written some important programs(mainly servlet) in java.. i have installed JDK5.0 and JRE (which was provided in digit CD) but it gives the error like
    for.. import java.io.*

    and for HttpServlet classes

    and i need a program called servlet.. so.. what can i do?
    thanx
     
  2. Vishal Gupta

    Vishal Gupta Microsoft MVP

    Joined:
    Jul 28, 2005
    Messages:
    5,173
    Likes Received:
    121
    Trophy Points:
    0
    Location:
    AskVG.com
    Did u set the ENVIRONMENT Variable for Java? If not then do as following:

    1.) Type sysdm.cpl in RUN dialog box.
    2.) Goto Advanced tab and click onEnvironment Variables.
    3.) In System Variables, append following in PATH variable:

    C:\Program Files\Java\jdk1.5.0_06\bin

    Change the location of the folder acc. to ur system ;)

    PS: Also separate this entry with other existing entries by using semi-colon ;
     
  3. JGuru

    JGuru Well-Known Member

    Joined:
    Dec 25, 2005
    Messages:
    1,705
    Likes Received:
    32
    Trophy Points:
    48
    Location:
    Space-time continuum
    @nithinks , Which IDE you use for Java? For Servlets to compile successfully, the file
    servlet.jar must be included in the CLASSPATH variable. Also use a good IDE like
    JCreator Pro v4.0. Get it from here or use NetBeans (www.netbeans.org) or Eclipse ( www.eclipse.org )

    For eg.,

    To compile :

    Javac -cp .; <path to servlet.jar>
     
    busyanuj likes this.
Thread Status:
Not open for further replies.

Share This Page