well it would depend on what shell you are using. a quick google search shows this:
For bash shell:
For tcsh or csh:
set PATH = ($PATH /usr/sbin /usr/local/bin)
That will let you set it in your current session. that basically says "set the PATH variable to what it currently is plus these two new directories."
if you want a more permanent change to it, you will probably have to edit your profile. in the tsch, it should be in your home directory, and is called '.cshrc'. There should be something similar for bash and other shells.
if you want to set the class path, then this is the band programming , if you want to use the jar packages , you just specified at command with with the help of -cp switch. if you want to the the path only then foloow the above answer.
But it is not working, I have a Resource.Cofig.properties file and a jar file. In jar file classes are using this resource file using ResourceBundle.getBundle("Resource.Cofig"), Now this properties file is not inside jar file, it is on the server at location /usr/emtize/ with its package structure. I want to run this jar (Runnable jar). How to do this.
when you use java -jar MyApp.jar, the jar's own classpath settings defined by its manifest file will override anything on the command line that is defined by the cp option. The cp option is worthless for setting a classpath in this situation.