I have created a classpath in command prompt. Later I want to change that classpath to another location. Please help me. Thanks
I have entered the command "set classpath= d:/java" Now i want to change this class path to some another location.
Thanks
I have created a classpath in command prompt. Later I want to change that classpath to another location. Please help me. Thanks
I have entered the command "set classpath= d:/java" Now i want to change this class path to some another location.
Thanks
As per my understanding you want to change the classpath which you have set by command
set classpath=d:java
can be done in two ways either you can set classpth directly as environment varible by
--> Right click on my computer select advanced options
--> there you will see option as environment variables open that option
--> now you will see multiple variables being set...search for classpath variable if it exist their edit this variable value by just putting semicolon and write ur full classpath ended by semicolon and save it.
FOR EG:-
variable name:- CLASSAPTH variable value- .;C:\Oracle\product\10.1.0\Client_2\jdbc\lib\ojdbc14.jar; Second option is just set your class in command promt as u have set earlier
by opening command prompt
set classpath=C:\Oracle\product\10.1.0\Client_2\jdbc\lib\ojdbc14.jar; both the method are easy but i would prefer you should go with first one as by doing that you didn't need to set your classpath again and again after you reboot your system or application.
If u want to do while running your java program ,you can use
java -classpath C:\java\MyClasses utility.myapp.Cool for more details about class path see oracle documentation about classpath.
From the desktop, right click the Computer icon. Choose Properties from the context menu. Click the Advanced system settings link. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New. In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
For e.g: PATH=/usr/local/jdk1.7.0/bin: