Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Getting package info from JAR file Date: Tue, 04 Oct 2011 07:16:51 -0700 Organization: A noiseless patient Spider Lines: 19 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 4 Oct 2011 14:16:53 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="25409"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19L2oFAcGIZJFqs705eXFLDzE1yj8Ehsyo=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: Cancel-Lock: sha1:W6cXOI0B3CZNMPNc37UPEQCTai0= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8523 On 10/4/2011 6:51 AM, laredotornado wrote: > Hi, > > I'm on Win XP using Java 7 but I have access to Unix tools using > Cygwin. I was wondering, short of unzipping a JAR file and searching > through it, if there's a way to figure out the package to which a > class belongs, assuming I know the class name and that the JAR file > definitely includes a class by this name. Not really, no. If you don't know the package name, the class could belong to any package. What package does the annotation @ManagedBean belong too? Well, on my system, there are three ManagedBeans which belong to different packages, so which one did you want? You've got to have the package name or you don't know which class it is.