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
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 ;
@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>
__________________
* Imagination is more important than knowledge.
-Albert Einstein