Ads Sponsored By Google :)

Monday 29 July 2013

How to Set Path|Classpath for java Jdk bin directory in Window 7

set path,set path in java, set path in windows, set path in linux, java set path, set path command, set path path,set path in ubuntu, set java path,set path java, set path in windows 7, windows 7 set path,set path windows 7,linux set path, set path linux, How to Set Path for Jdk bi directory, How to set path for Java bin in Windows 7, how to set path for Java bin directory in windows 7, how to set classpath for java jdk bin directory in windows 7, set classpath for java jdk in window 7, setting classpath for java jdk in window 7,set classpath in window7 environmental variables.

How to Set Path|Classpath for java Jdk bin directory in Window 7

While we writing the java programs and save it as (.java) file in the folder bin directory of jdk, java compiler easily compile and find out the (.java) file.But if we save the (.java) file in other than this location java compiler don't about the (.java) file. Because in bin directory of jdk has javac, javah etc... so many tools are available in that bin directory.Operating system dont about the java compiler so we need to set PATH and Classpath environmental variables in our system.


Set Path & Classpath in Window 7

How to Set Path to our file in Operating System

In Command Prompt :

set Path=C:\program Files\Java\jdk1.7\bin;.;


In Window 7 Environmental Variables :

Following Steps for the setting path to our file.
1. Go to My Computer
2. Right Click on My Computer, go to properties
3. Then Go to Advanced tab.
4. Go to Environmental Variables tab.
5. Search for the Path, Click on edit.
6. Then add path of JDK bin folder as C:\program Files\Java\jdk1.7\bin
7. Finally Click Ok.

In Command Prompt:

Setting Classpath for Servlet-api.jar and Ojdbc.jar.

Set classpath=C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar;.;

How to Set Classpath for Jar :

1. Go to My Computer
2. Right Click on My Computer, go to properties
3. Then Go to Advanced tab.
4. Go to Environmental Variables tab.
5. Search for the Classpath, Click on edit.
6. Then add path of JDK bin folder as C:\program Files\Java\jdk1.7\lib
7. Finally Click Ok.

For servlets jar from Tomcat apache setting the classpath

C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar

How Can we set Multiple Jar file in classpath :

In Command Prompt:

Setting Classpath for Servlet-api.jar and Ojdbc.jar jars in Command Prompt.

 
Set classpath=C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar;E:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar;.

In Enviromental Variables :

Need to set Classpath from the above
1. Go to My Computer
2. Right Click on My Computer, go to properties
3. Then Go to Advanced tab.
4. Go to Environmental Variables tab.
5. Search for the Classpath, Click on edit.
6. Then add path of JDK bin folder as C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar;E:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar;.
7. Finally Click Ok.









No comments:

Post a Comment

LinkWithin