Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8632
| From | www <xsli2@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How to print out the currently used JAR file path to verify it is using right JAR? |
| Date | 2011-10-07 09:37 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <cd3a9132-42f5-489d-add0-00050a21d579@dm9g2000vbb.googlegroups.com> (permalink) |
| References | <4d7daeb4-7da7-47c0-a4cf-d3c5d1be2ef0@gd10g2000vbb.googlegroups.com> <13afa738-1198-4569-84be-9fc6627c52d6@t16g2000yqm.googlegroups.com> <j6n6ft$9uh$1@dont-email.me> |
On Oct 7, 11:39 am, markspace <-@.> wrote: > On 10/7/2011 7:25 AM, www wrote: > > > Just to add more details about my question: > > > In my code, I am using class Abc, which is from 3rd party JAR > > file(MyJAR.jar). I hope to print out Abc's class path to see it is > > from a/b/MyJAR.old.jar or from c/d/MyJAR.new.jar > > > I understand the correct way is to check the classpath > > Shouldn't you just be setting this from the command line or in the main > Jar file? I'm a little confused by your question. You should know the > class path before the program starts executing. > > Can you just search the existing class path for occurrences of this > class "Abc"? My project is using A.jar, B.jar, C.jar, D.jar etc and they all are in the classpath. Inside my code, I am using the class Abc. My program works fine on one linux machine and fails on another almost identical linux machine. Using the printing method above, I just found out, to my surprise, both B.jar and F.jar have Abc.class. I was totally unaware of this. In one machine, Abc is loaded from B.jar and in another machine, loaded from F.jar. With the cause being found, now it is easy to fix the problem. Thank you.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
How to print out the currently used JAR file path to verify it is using right JAR? www <xsli2@yahoo.com> - 2011-10-07 06:56 -0700
Re: How to print out the currently used JAR file path to verify it is using right JAR? www <xsli2@yahoo.com> - 2011-10-07 07:25 -0700
Re: How to print out the currently used JAR file path to verify it is using right JAR? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-10-07 10:18 -0500
Re: How to print out the currently used JAR file path to verify it is using right JAR? www <xsli2@yahoo.com> - 2011-10-07 08:30 -0700
Re: How to print out the currently used JAR file path to verify it is using right JAR? markspace <-@.> - 2011-10-07 08:39 -0700
Re: How to print out the currently used JAR file path to verify it is using right JAR? Lew <lewbloch@gmail.com> - 2011-10-07 08:47 -0700
Re: How to print out the currently used JAR file path to verify it is using right JAR? www <xsli2@yahoo.com> - 2011-10-07 09:37 -0700
Re: How to print out the currently used JAR file path to verify it is using right JAR? markspace <-@.> - 2011-10-07 11:17 -0700
Re: How to print out the currently used JAR file path to verify it is using right JAR? www <xsli2@yahoo.com> - 2011-10-07 11:37 -0700
Re: How to print out the currently used JAR file path to verify it is using right JAR? Roedy Green <see_website@mindprod.com.invalid> - 2011-10-07 10:50 -0700
Re: How to print out the currently used JAR file path to verify it is using right JAR? www <xsli2@yahoo.com> - 2011-10-07 11:00 -0700
csiph-web