Classpath Issues with J2SE 1.4
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dennis_Lee
Posted On:   Saturday, March 16, 2002 01:30 AM

I have recently downloaded and installed j2se 1.4 on my Linux box. I'm having problems running a program in a jar file unless my current directory is where the jar file is located: java -jar msv.jar arg1 arg2 This seems like a classic classpath problem but I have ensured that my classpath is set to point to the directory and .jar file as in: CLASSPATH=/home/dennis/msv-20011113/msv.jar I get a ZipException indicating the the file doesn't exist. Of course when I return to the directory where the jar is defined, it all works well. Does anyone have an idea of what the problem might be? I'm running RedHat 7.2 Thanks,    More>>

I have recently downloaded and installed j2se 1.4 on my Linux box. I'm having problems running a program in a jar file unless my current directory is where the jar file is located:



java -jar msv.jar arg1 arg2



This seems like a classic classpath problem but I have ensured that my classpath is set to point to the directory and .jar file as in:



CLASSPATH=/home/dennis/msv-20011113/msv.jar



I get a ZipException indicating the the file doesn't exist. Of course when I return to the directory where the jar is defined, it all works well.



Does anyone have an idea of what the problem might be? I'm running RedHat 7.2




Thanks,



Dennis Lee

   <<Less

Re: Classpath Issues with J2SE 1.4

Posted By:   Nathan_Meyers  
Posted On:   Tuesday, March 19, 2002 09:24 AM

The CLASSPATH is used for finding classes, not for finding jars. The -jar option doesn't use it, so you need to give an explicit path:



java -jar /home/dennis/msv-20011113/msv.jar arg1 argc
About | Sitemap | Contact