Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Java Reflection problem in Eclipse?
Java Reflection problem in Eclipse? [message #1273091] Wed, 19 March 2014 13:39 Go to next message
Artem Popenkov is currently offline Artem PopenkovFriend
Messages: 2
Registered: March 2014
Junior Member
I'm working on Eclipse plugin development. At one place, I need to load classes from external jar and read its methods annotations. Unfortunately, when I call method.isAnnotationPresent(MyAnnotaion.class), it return false all the time (I run/debug the plugin from Eclipse). If I run the snippet from JUnit (from Eclipse), it works fine.
Any suggestions?
Re: Java Reflection problem in Eclipse? [message #1273125 is a reply to message #1273091] Wed, 19 March 2014 14:58 Go to previous message
Artem Popenkov is currently offline Artem PopenkovFriend
Messages: 2
Registered: March 2014
Junior Member
I'm sorry for disturbing. The problem is solved. My problem was that MyAnnotation was in jar outside eclipse and I had to add Eclipse's classloader into myJars classloader...
Re: Java Reflection problem in Eclipse? [message #1273127 is a reply to message #1273091] Wed, 19 March 2014 14:55 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Artem,

What do you mean exactly by "load classes from external jar"? Is that
jar a library specified in the MANIFEST.MF of a bundle?

On 19/03/2014 7:25 AM, Artem Popenkov wrote:
> I'm working on Eclipse plugin development. At one place, I need to
> load classes from external jar and read its methods annotations.
> Unfortunately, when I call
> method.isAnnotationPresent(MyAnnotaion.class), it return false all the
> time (I run/debug the plugin from Eclipse). If I run the snippet from
> JUnit (from Eclipse), it works fine.
> Any suggestions?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Licease transfer/upgrade?
Next Topic:Trying to work on multiple projects
Goto Forum:
  


Current Time: Thu Apr 25 17:15:06 GMT 2024

Powered by FUDForum. Page generated in 0.08277 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top