Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

retrieve all interfaces in jar static possible

Thread view: 
Petterson Mikael - 02 Jun 2005 08:16 GMT
Hi,

I am curious to know if it is possible to extract all interfaces (
including methods and fields) from my jar. I know of refelection but
AFAIK the class  has to be loaded in the jvm to use reflection on it.
True? Is there a static possiblity?

If no static possibility then will all my classes in jar be loaded when
I start my jvm ( java -jar myapp.jar). Is it possible to 'extract' all
classes ( to be put in a list) and run refelction on them?

Cheers,

//Mikael
Andrew Thompson - 02 Jun 2005 11:47 GMT
> I am curious to know if it is possible to extract all interfaces (
> including methods and fields) from my jar.
..
> Is it possible to 'extract' all
> classes ( to be put in a list)

<http://java.sun.com/j2se/1.5.0/docs/api/java/util/zip/ZipFile.html#entries()>

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

Dale King - 03 Jun 2005 00:06 GMT
>>I am curious to know if it is possible to extract all interfaces (
>>including methods and fields) from my jar.
[quoted text clipped - 5 lines]
>
> <http://java.sun.com/j2se/1.5.0/docs/api/java/util/zip/ZipFile.html#entries()>

And then if you want to extract the data from those entries in the Zip
file without actually loading them into your VM you might want to look
at BCEL: http://jakarta.apache.org/bcel/

Signature

 Dale King



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.