Prepare for your Next Interview
This is a discussion on path & classpath within the Java forums, part of the Software Development category; how can i diffirentiate the path and class path in java...
|
|||
|
how can i diffirentiate the path and class path in java
|
| The Following 2 Users Say Thank You to komakula Ravindranath For This Useful Post: | ||
| Sponsored Links |
|
|||
|
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 |
| The Following 3 Users Say Thank You to kumarprabu For This Useful Post: | ||
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Absolute path and Relative path | Anthonymcg | Unix/Linux | 2 | 07-26-2008 08:27 AM |
| What is Access Path | Lokesh M | Data Warehousing | 0 | 01-31-2008 05:59 AM |
| How to set a classpath with jar file | Geek_Guest | Java | 1 | 10-22-2007 08:00 AM |
| Unable to select the right path | anilsram | Career Advice | 1 | 03-04-2007 05:13 AM |
| ClassPath and Module Dependencies in WebSphere | Lokesh M | Web Servers | 0 | 06-21-2006 12:02 AM |