The Artima Developer Community
Sponsored Link

Java Answers Forum
How to call a method inside a class in a Jar file

5 replies on 1 page. Most recent reply: Mar 19, 2002 9:05 PM by Swaraj

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 5 replies on 1 page
Swaraj

Posts: 24
Nickname: swaraj
Registered: Mar, 2002

How to call a method inside a class in a Jar file Posted: Mar 17, 2002 10:54 PM
Reply to this message Reply
Advertisement
Hi

I have this typical problem, how do i call the method inside a class file which is inside a jar file,

Thanks
Swaraj


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: How to call a method inside a class in a Jar file Posted: Mar 17, 2002 11:56 PM
Reply to this message Reply
Just add the jar file to your CLASSPATH. Add the full path, including the jar file. For instance, the blazing fast Jikes compiler that I use instead of the dawg-slow JavaC compiler needs to know where the Java runtime library is, so my classpath looks something like this:

classpath=C:\jdk1.3.1_01\jre\lib\rt.jar;other_stuff

Swaraj

Posts: 24
Nickname: swaraj
Registered: Mar, 2002

Re: How to call a method inside a class in a Jar file Posted: Mar 19, 2002 12:43 AM
Reply to this message Reply
Thanks
But i found out someother way, and was successful

swarak

Swaraj

Posts: 24
Nickname: swaraj
Registered: Mar, 2002

Re: How to call a method inside a class in a Jar file Posted: Mar 19, 2002 12:44 AM
Reply to this message Reply
Thanks
I found another way for this and was successful

ron

Posts: 1
Nickname: rc
Registered: Mar, 2002

Re: How to call a method inside a class in a Jar file Posted: Mar 19, 2002 7:33 AM
Reply to this message Reply
should be as willing to share your solution as you are willing to ask and take solutions from others.

Swaraj

Posts: 24
Nickname: swaraj
Registered: Mar, 2002

Re: How to call a method inside a class in a Jar file Posted: Mar 19, 2002 9:05 PM
Reply to this message Reply
Hi
I did this
As i am using a signed applet, which is in a jar file, i had removed the getxxx and setxxx methods which i wrote in my applet class file, and instead passed the values as parameters in the param tag, and used them in the method call inside my applet to get the sufficent results and this worked.

Thanks
Swaraj

Flat View: This topic has 5 replies on 1 page
Topic: JNI problem Previous Topic   Next Topic Topic: Two Dimensional Arrays

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use