dcsimg
How to compile a java file which depends on multiple .jar files ?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, May 11, 2005 05:11 PM

Hi All, I have one basic question on java file compilation. Here it goes.. 1) I have one jar file coming from a vendor and say the name is x.jar 2) I have another jar file which is wrapper implementation of x.jar classes and lets name it y.jar 3) Now I have written a single bean which uses both x.jar and y.jar. Lets name the bean as Bean.java. Can you tell me how do I compile Bean.java ? I mean to say how do I include two jar files [x.jar and y.jar] in compilation ? 4) I have written one small client say client.java to use the bean written in Bean.java. Can you tell me how should I complie client.java ? Thanks in advance for your help.    More>>


Hi All,

I have one basic question on java file compilation. Here it goes..


1) I have one jar file coming from a vendor and say the name is x.jar


2) I have another jar file which is wrapper implementation of x.jar classes and lets name it y.jar


3) Now I have written a single bean which uses both x.jar and y.jar. Lets name the bean as Bean.java. Can you tell me how do I compile Bean.java ? I mean to say how do I include two jar files [x.jar and y.jar] in compilation ?


4) I have written one small client say client.java to use the bean written in Bean.java.
Can you tell me how should I complie client.java ?



Thanks in advance for your help.




With best regards,


RNS    <<Less

Re: How to compile a java file which depends on multiple .jar files ?

Posted By:   sujata_samal  
Posted On:   Wednesday, July 20, 2005 02:49 AM

To compile the Bean.java ,x.jar and y.jar shud be in the classpath.
I mean set the jar(x and y) files into ur CLASSPATH variable
and to compile Client.java the Bean class shud be in calsspath
so set the Bean(class file) too into the CLASPATH variable





Sujata.

Re: How to compile a java file which depends on multiple .jar files ?

Posted By:   vinay_kumar  
Posted On:   Thursday, July 7, 2005 07:11 AM

Hi, this is vinay i think that u should set the classpath for both the jar files that's enough to compile the java file
vinay
About | Sitemap | Contact