Results 1 to 3 of 3

Thread: path & classpath

  1. #1

    Smile path & classpath

    how can i diffirentiate the path and class path in java


  2. #2
    Junior Member
    Join Date
    Jan 2008
    Answers
    14

    Smile Re: path & classpath

    Hi

    Path is normal cmd prompt command. using this commend u can located where the exe file is located.

    for ex: if u have ur javac.exe file in C:\program file\java\jdk1.5.0\bin means

    if u want to run this in any where of ur cmd prompt means u want set path=C:\program files\java\jdk1.5.0\bin

    and classpath is used for when u compiling java program at the time u want to include some jar files using classpath u can include that file.

    for example suppose if u want to compile one servlet file means u want to incluce that file like this.
    javac -classpath=C:\program files\apache\tomcat5.0\common\lib\servelet-api.jar testservlet.java

    suppose if u have more servlet file u want to compile all the file means u set the classpath using set classpath keyword in ur commend pronmpt like this

    set classpath=C:\program files\apache\tomcat5.0\common\lib\servelet-api.jar

    once u set like that means u can compile all program without mention the classpath in ur java commend. like this u can compile

    javac testservlet.java

    thnx bye if u have any doubt reply


  3. #3

    Post Re: path & classpath

    What difference between single and multi threaded servlet


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact